Ejemplo n.º 1
0
    @Override
    public boolean onMarkerClick(Marker marker) {

      setMarkerIcon(lastMarker, false);
      setMarkerIcon(marker, true);
      lastMarker = marker;
      MyPoiInfo info = data.get(marker.getZIndex());

      showInfoView(info);

      return true;
    }
Ejemplo n.º 2
0
    private void setMarkerIcon(Marker marker, boolean focused) {

      if (marker == null) return;

      int pos = marker.getZIndex();

      BitmapDescriptor descriptor =
          BitmapDescriptorFactory.fromResource(
              focused
                  ? marker_focus_icon_ids[pos % marker_focus_icon_ids.length]
                  : marker_icon_ids[pos % marker_icon_ids.length]);

      marker.setIcon(descriptor);
    }