Hi All,
In the webapplication, we have a feature called autorefresh. Autorefresh will giving the live position of vehicle movement within each 1 minute interval
A graphic(ball icon) display is available on the map based on the location of vehicle . Now in each one miniute this graphic is placing to different part of the map . Now my requirement is I want to refresh the map only when the graphic goes out of visible area. each one miniute map refreshing is taking time to load map each time. how we can understand that the graphic is out of mapcontrol area?
Solved! Go to Solution.
Compare the XY of the vehicle to the current map extent. If it falls outside of the current map extent zoom to the XY vehicle location.
Compare the XY of the vehicle to the current map extent. If it falls outside of the current map extent zoom to the XY vehicle location.
Thank U so much for your reply. Can u tell me how can I test this ?I tried the way like below but not success
MyMap.Extent.contains(graphic.Geometry) = True
You can try something like:
if (MyMap.Extent.Intersects(graphic.Geometry..Extent)) { ........
This should work if your graphic coordinates are in the same Spatial Reference as the map.