Hello! I’m doing some simple “zooming” to a layer’s bounding box. However, it seems like there is always some extra space around the extent.
For example, let’s say I have a single line feature in an InMemoryFeatureLayer (layer is named sampleLayer). To zoom to that layer, I do:
sampleLayer.Open();
myMap.CurrentExtent = sampleLayer.GetBoundingBox();
myMap.Refresh());
Afterwards, the map looks like:
So it did zoom in, but I was expecting it to zoom to the point where the ends of the line are at the edge of the map. Is there a certain setting to do this? Or does it have to do with zoom levels?