Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Warning

This documentation is no longer actively supported and may be out of date. Going forward, please visit and bookmark our new site (https://docs.phunware.com/) for up-to-date documentation.

Getting POI info from a Map Marker

 

The Mapping SDK associates a PointOptions object with its associated Google map marker object.

When setting up InfoWindow click listeners,  you can access the POI info from the marker by calling the getTag() method on the marker and cast it to PointOptions.

Code Block
themeRDark
languagejava
map.getGoogleMap().setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {
    @Override
    public void onInfoWindowClick(Marker marker) {
        PointOptions point = (PointOptions) marker.getTag();
		if (point != null) {
	        long floorId = point.getFloorId();
    	    String name = point.getName();
		}
    }
});