@Override public boolean onMarkerClick(Marker marker) { if (getFeature(marker) != null) { listener.onFeatureClick(getFeature(marker)); } else if (getContainerFeature(marker) != null) { listener.onFeatureClick(getContainerFeature(marker)); } else { listener.onFeatureClick(getFeature(multiObjectHandler(marker))); } return false; } });
/** * Store a new property key and value * * @param property key of the property to store * @param propertyValue value of the property to store * @return previous value with the same key, otherwise null if the key didn't exist */ public String setProperty(String property, String propertyValue) { return super.setProperty(property, propertyValue); }
/** * Adds the KML data to the map */ @Override public void addLayerToMap() throws IOException, XmlPullParserException { super.addKMLToMap(); }
public void testRemoveFeature() throws Exception { Point p = new Point(new LatLng(40, 50)); Feature feature1 = new Feature(p, null, null); mRenderer.addFeature(feature1); mRenderer.removeFeature(feature1); assertFalse(mRenderer.getFeatures().contains(feature1)); }
public void testAddFeature() throws Exception { Point p = new Point(new LatLng(30, 50)); Feature feature1 = new Feature(p, null, null); mRenderer.addFeature(feature1); assertTrue(mRenderer.getFeatures().contains(feature1)); }
public void testGetType() throws Exception { lineString = createSimpleLineString(); assertNotNull(lineString); assertNotNull(lineString.getGeometryType()); assertEquals("LineString", lineString.getGeometryType()); lineString = createLoopedLineString(); assertNotNull(lineString); assertNotNull(lineString.getGeometryType()); assertEquals("LineString", lineString.getGeometryType()); }
public void testGetMap() throws Exception { assertEquals(mMap1, mRenderer.getMap()); }
public void testGetFeatures() throws Exception { assertEquals(featureSet, mRenderer.getFeatures()); }
/** * Gets the map on which the layer is rendered * * @return map on which the layer is rendered */ public GoogleMap getMap(){ return mRenderer.getMap(); }
/** * Remove a specified feature from the map * * @param feature feature to be removed */ protected void removeFeature(Feature feature) { mRenderer.removeFeature(feature); }
/** * Gets an iterable of KmlContainerInterface objects * * @return iterable of KmlContainerInterface objects */ public Iterable<KmlContainer> getContainers() { return super.getContainers(); }
/** * Checks if the current layer has been added to the map * * @return true if the layer is on the map, false otherwise */ public boolean isLayerOnMap() { return mRenderer.isLayerOnMap(); }
/** * Gets an iterable of KmlGroundOverlay objects * * @return iterable of KmlGroundOverlay objects */ public Iterable<KmlGroundOverlay> getGroundOverlays() { return super.getGroundOverlays(); }
/** * Retrieves a corresponding Feature instance for the given Object * Allows maps with multiple layers to determine which layer the Object * belongs to. * * @param mapObject Object * @return Feature for the given object */ public Feature getFeature(Object mapObject) { return mRenderer.getFeature(mapObject); }
/** * Gets the default style used to render GeoJsonPoints. Any changes to this style will be * reflected in the features that use it. * * @return default style used to render GeoJsonPoints */ public GeoJsonPointStyle getDefaultPointStyle() { return mRenderer.getDefaultPointStyle(); }
/** * Gets the default style used to render GeoJsonLineStrings. Any changes to this style will be * reflected in the features that use it. * * @return default style used to render GeoJsonLineStrings */ public GeoJsonLineStringStyle getDefaultLineStringStyle() { return mRenderer.getDefaultLineStringStyle(); }
/** * Gets the default style used to render GeoJsonPolygons. Any changes to this style will be * reflected in the features that use it. * * @return default style used to render GeoJsonPolygons */ public GeoJsonPolygonStyle getDefaultPolygonStyle() { return mRenderer.getDefaultPolygonStyle(); } }
/** * Renders the layer on the given map. The layer on the current map is removed and * added to the given map. * * @param map to render the layer on, if null the layer is cleared from the current map */ public void setMap(GoogleMap map){ mRenderer.setMap(map); }
@Override public void onPolylineClick(Polyline polyline) { if (getFeature(polyline) != null) { listener.onFeatureClick(getFeature(polyline)); } else if (getContainerFeature(polyline) != null) { listener.onFeatureClick(getContainerFeature(polyline)); } else { listener.onFeatureClick(getFeature(multiObjectHandler(polyline))); } } });
@Override public void onPolygonClick(Polygon polygon) { if (getFeature(polygon) != null) { listener.onFeatureClick(getFeature(polygon)); } else if (getContainerFeature(polygon) != null) { listener.onFeatureClick(getContainerFeature(polygon)); } else { listener.onFeatureClick(getFeature(multiObjectHandler(polygon))); } } });