Exemplo n.º 1
0
  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);
  }
Exemplo n.º 2
0
 @Override
 public void onResume() {
   super.onResume();
   inject();
   mapController.restoreFromSavedLocation();
   registerLocationReceivers();
   poiMarkersLayer.repopulate();
 }
Exemplo n.º 3
0
 @Override
 public void onPause() {
   super.onPause();
   mapController.saveLocation();
   locationMarkerLayer.removeAllItems();
   poiMarkersLayer.removeAllItems();
   unregisterLocationReceivers();
 }
Exemplo n.º 4
0
 public void repopulatePoiLayer() {
   poiMarkersLayer.repopulate();
 }
Exemplo n.º 5
0
 public void clearMarkers() {
   if (poiMarkersLayer != null) {
     poiMarkersLayer.clearAll();
   }
 }
Exemplo n.º 6
0
 public void addPoi(SimpleFeature simpleFeature) {
   MarkerItem markerItem = simpleFeature.getMarker();
   poiMarkersLayer.addItem(markerItem);
 }