Zoom to extent splits features on date line

901
1
02-24-2017 12:57 PM
PatrckWild
New Contributor II

I have linear features that span the Pacific. When those features are queried in the application the map zooms to the feature but centers on 0° resulting in a 'split' view of the linear graphic.

This is how I display my results:

var queryExtent = graphicsUtils.graphicsExtent(results.features);
map.setExtent(queryExtent, true);

Is there a better way to do this other than using graphicsExtent?

Thanks,

PW

0 Kudos
1 Reply
MatthewHamilton-Smith
New Contributor II

I am using a different method and SceneView, but am facing a similar problem. Because the feature set I am using straddles the date line, the scene zooms to Africa. From this perspective, I cannot actually see any of the features.

view.goTo(layer.queryExtent())

0 Kudos