public void centerOn(SimpleFeature simpleFeature, double zoom) { MarkerItem focused = poiMarkersLayer.getFocus(); if (focused != null) { focused.setMarker(null); } focused = poiMarkersLayer.getByUid(simpleFeature); if (focused != null) { focused.setMarker(highlightMarker); poiMarkersLayer.setFocus(focused); } GeoPoint geoPoint = simpleFeature.getGeoPoint(); getMap().animator().animateTo(DURATION, geoPoint, zoom, false); }
@Override public void onResume() { super.onResume(); inject(); mapController.restoreFromSavedLocation(); registerLocationReceivers(); poiMarkersLayer.repopulate(); }
@Override public void onPause() { super.onPause(); mapController.saveLocation(); locationMarkerLayer.removeAllItems(); poiMarkersLayer.removeAllItems(); unregisterLocationReceivers(); }
public void repopulatePoiLayer() { poiMarkersLayer.repopulate(); }
public void clearMarkers() { if (poiMarkersLayer != null) { poiMarkersLayer.clearAll(); } }
public void addPoi(SimpleFeature simpleFeature) { MarkerItem markerItem = simpleFeature.getMarker(); poiMarkersLayer.addItem(markerItem); }