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); }
private MarkerItem getUserLocationMarker() { MarkerItem markerItem = new MarkerItem("ME", "Current Location", getUserLocationPoint()); MarkerSymbol symbol = AndroidGraphics.makeMarker( getResources().getDrawable(R.drawable.ic_locate_me), MarkerItem.HotspotPlace.CENTER); markerItem.setMarker(symbol); return markerItem; }