Search in sources :

Example 6 with GeoJsonPointStyle

use of com.google.maps.android.geojson.GeoJsonPointStyle in project iosched by google.

the class MapUtils method createIconMarker.

/**
 * Creates a GeoJsonPointStyle for an icon. The icon is selected
 * in {@link #getDrawableForIconType(Context, String)} and anchored
 * at the bottom center for the location. When isActive is set to true, the icon is tinted.
 */
private static GeoJsonPointStyle createIconMarker(final String iconType, final String title, boolean isActive, Context context) {
    final Bitmap iconBitmap = getIconMarkerBitmap(context, iconType, isActive);
    final BitmapDescriptor icon = BitmapDescriptorFactory.fromBitmap(iconBitmap);
    GeoJsonPointStyle pointStyle = new GeoJsonPointStyle();
    pointStyle.setTitle(title);
    pointStyle.setVisible(false);
    pointStyle.setIcon(icon);
    pointStyle.setAnchor(0.5f, 1f);
    return pointStyle;
}
Also used : Bitmap(android.graphics.Bitmap) GeoJsonPointStyle(com.google.maps.android.geojson.GeoJsonPointStyle) BitmapDescriptor(com.google.android.gms.maps.model.BitmapDescriptor)

Example 7 with GeoJsonPointStyle

use of com.google.maps.android.geojson.GeoJsonPointStyle in project iosched by google.

the class EditorMapFragment method setElementsDraggable.

/**
 * Sets all markers on the map as draggable.
 */
public void setElementsDraggable(boolean isDraggable) {
    // Set all markers as draggable
    for (GeoJsonFeature feature : mMarkers.values()) {
        GeoJsonPointStyle pointStyle = feature.getPointStyle();
        pointStyle.setDraggable(isDraggable);
        feature.setPointStyle(pointStyle);
    }
}
Also used : GeoJsonFeature(com.google.maps.android.geojson.GeoJsonFeature) GeoJsonPointStyle(com.google.maps.android.geojson.GeoJsonPointStyle)

Aggregations

GeoJsonPointStyle (com.google.maps.android.geojson.GeoJsonPointStyle)7 Bitmap (android.graphics.Bitmap)3 BitmapDescriptor (com.google.android.gms.maps.model.BitmapDescriptor)3 GeoJsonFeature (com.google.maps.android.geojson.GeoJsonFeature)2 GeoJsonPoint (com.google.maps.android.geojson.GeoJsonPoint)2 GeoJsonLayer (com.google.maps.android.geojson.GeoJsonLayer)1 IconGenerator (com.google.maps.android.ui.IconGenerator)1