Hello,
I am trying to load the map using MBTiles and am getting an error when the map is adding to the Overlays. The error is System.NullReferenceException. Using the Product Center 12 HowDoI example application I am using the exact steps and not sure as to why I am getting the error.
Thank you,
Eric
Here is my code in the Map2_Loaded function:
thinkGeoMBTilesFeatureLayer2 = new ThinkGeoMBTilesLayer(“MapData/Nevada.mbtiles”, new Uri(“MapData/thinkgeo-world-streets-lightCORE.json”, UriKind.Relative));
thinkGeoMBTilesFeatureLayer.BitmapTileCache = null;
layerOverlay2.TileWidth = 512;
layerOverlay2.TileHeight = 512;
layerOverlay.DrawingQuality = DrawingQuality.HighSpeed;
layerOverlay2.Layers.Add("MBFiles", thinkGeoMBTilesFeatureLayer2);
mapView2.MapUnit = GeographyUnit.Meter;
mapView2.ZoomLevelSet = new ThinkGeoCloudMapsZoomLevelSet();
if (!mapView2.Overlays.Contains("MBFiles"))
{
// Error here
mapView2.Overlays.Add("MBFiles", layerOverlay);
}
mapView2.Refresh();