-
Is there a callback when the visible area of the map changes? |
Beta Was this translation helpful? Give feedback.
Answered by
devemux86
Apr 20, 2023
Replies: 2 comments 1 reply
-
1. map.layers().add(MapEventLayer(map))
2. public class MapEventLayer extends Layer implements Map.UpdateListener {
public MapEventLayer(Map map) {
super(map);
}
@Override
public void onMapEvent(Event e, MapPosition mapPosition) {
if (mMap.getHeight() != 0) {
if (Map.UPDATE_EVENT == e) {
//callback
}
}
}
} |
Beta Was this translation helpful? Give feedback.
0 replies
-
Can listen for map position changes (skipping the map.events.bind(new Map.UpdateListener() {
@Override
public void onMapEvent(Event e, MapPosition mapPosition) {
if (e == Map.UPDATE_EVENT)
return;
...
}
}); |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
333bkz
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Can listen for map position changes (skipping the
UPDATE_EVENT
) with: