Select to view content in your preferred language

Popups and Screen Point go off map during infinite pan

260
1
05-23-2024 10:14 AM
Status: Open
Labels (2)
TimPurdum
New Contributor II

When using a 2D map and zooming out, you can easily get a square map within a rectangular view, with whitespace on the left and right. Panning the map will cause the basemap and features to wrap around immediately. However, Popups and the results of view.toScreen(point) do not wrap correctly. Instead, they will continue to the left or right until hitting the edge of the view instead of the edge of the map.

 

Tags (3)
1 Comment
JoelBennett

This appears to be a bug.  Below is a screenshot from our viewer with a red border added around the map image, and a blue border around the map's element on the page:

map_img.png

The documentation for MapView.extent says this (my emphasis added): "The extent represents the visible portion of a map within the view as an instance of Extent."  Based on this, my understanding is that the extent property in this instance should return the coordinates of the red rectangle, but it actually returns the coordinates of the blue rectangle.