Reputation: 75
we want to retrieve all visible markers of a certain map section that is currently rendered. For this the HERE Maps API offers the method requestMarkers() for layers. Here is a code snippet how we would like to realize it:
//get currently rendered map section
var viewBounds = HEREMap.map.getViewBounds();
//get current zoom level
var mapZoom = HEREMap.map.getZoom();
HEREMap.allVisMarkers = [];
//retrieve all visible markers on this map section
HEREMap.allVisMarkers = HEREMap.layer.requestMarkers(viewBounds,mapZoom);
Unfortunately the getZoom() method of the map does not return the actual zoom level, but the zoom level defined when creating the map.
Is there a way to "actualize" the zoom level when the mouse wheel is turned (getZoom() method didn't work with standard zoom control either), or are we using the wrong method?
Thanks in advance, Team DG7
Upvotes: 2
Views: 2377
Reputation: 75
We found a solution for our problem: We are using SAP FPM Framework in combination with free-style GUIBB to show the map. The error was that we created the map for every framework loop.
To sum it up: The getZoom() method works just fine.
Upvotes: 2