AnsweredAssumed Answered

Scale of shapefile layers

Question asked by JeromeGervais on Oct 3, 2015
Latest reply on Oct 7, 2015 by JeromeGervais

Hi,

 

I'm using runtime SDK 10.2.6 in a WPF app. I'm tring to add several layers of different kinds in my Map.

 

// base
MyMapView.Map.Layers.Add(new OpenStreetMapLayer());

// first feature layer, from service
var serviceTable = await ServiceFeatureTable.OpenAsync(
    new Uri("http://sampleserver6.arcgisonline.com/arcgis/rest/services/Wildfire/FeatureServer/0"));
var layer = new FeatureLayer(serviceTable)
{
    ID = "featureLayer"
};
MyMapView.Map.Layers.Add(layer);

// second feature layer, from shapefile (world-cities.shp in the sample data)
var shapefile = await ShapefileTable.OpenAsync(path);
var layer2 = new FeatureLayer(shapefile)
{
    ID = shapefile.Name,
    DisplayName = path,
};
MyMapView.Map.Layers.Add(layer2);

 

The thing is, the layers are rendered, but the shapefile one does not have the same scale :

dezoom.PNG

(when zooming)

zoom.PNG

Could someboby please tell me what I'm missing here ?

Thanks

Outcomes