I’m trying to display points from a TAB file but they are not showing, I have gone though some samples and see nothing different in the code but the point are still not showing.
i can’t find the problem in the code
MapView Map = FindViewById(Resource.Id.MapView);
Map.CurrentExtent = new RectangleShape(-131.6518984375, 36.49099609375, -71.6226015625, 5.94900390625);
Map.MapUnit = GeographyUnit.DecimalDegree;
Map.SetBackgroundColor(Color.Aqua);
//loading map
TabFeatureLayer.BuildIndexFile(System.IO.Path.Combine(targetDirectory, "Morelos.TAB"));
TabFeatureLayer ftl = new TabFeatureLayer(System.IO.Path.Combine(targetDirectory, "Morelos.TAB"), TabFileReadWriteMode.ReadOnly);
ftl.Name = "Mexico";
ftl.IsVisible = true;
ZoomLevelSet zl = new ZoomLevelSet();
zl.ZoomLevel01.DefaultAreaStyle = AreaStyles.Country1;
zl.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
ftl.ZoomLevelSet = zl;
//trying to load points
TabFeatureLayer.BuildIndexFile(System.IO.Path.Combine(targetDirectory, "Infraestructura01.TAB"));
TabFeatureLayer ftl2 = new TabFeatureLayer(System.IO.Path.Combine(targetDirectory, "Infraestructura01.TAB"), TabFileReadWriteMode.ReadOnly);
ftl2.RequireIndex = true;
ftl2.Transparency = 120f;
ftl2.Name = "Infraestructura";
ZoomLevelSet zl2 = new ZoomLevelSet();
ftl2.ZoomLevelSet.ZoomLevel01.DefaultPointStyle = new PointStyle(GetGeoImageFromImageId(Resource.Drawable.public_facility));
ftl2.ZoomLevelSet.ZoomLevel01.ApplyUntilZoomLevel = ApplyUntilZoomLevel.Level20;
ftl2.FeatureSource.Projection = GetWgs84ToMercatorProjection();
LayerOverlay ol = new LayerOverlay();
ol.Layers.Add("Mexico", ftl);
LayerOverlay ol2 = new LayerOverlay();
ol2.TileType = TileType.SingleTile;
ol2.Layers.Add("infra", ftl2);
Map.Overlays.Add("Mexico", ol);
Map.Overlays.Add("infra", ol2);
ftl.Open();
Map.CurrentExtent = ftl.GetBoundingBox();
Map.Refresh();