Search in sources :

Example 1 with GeoJsonLayer

use of com.google.maps.android.data.geojson.GeoJsonLayer in project android-maps-utils by googlemaps.

the class GeoJsonDemoActivity method retrieveFileFromResource.

private void retrieveFileFromResource() {
    try {
        GeoJsonLayer layer = new GeoJsonLayer(getMap(), R.raw.earthquakes_with_usa, this);
        addGeoJsonLayerToMap(layer);
    } catch (IOException e) {
        Log.e(mLogTag, "GeoJSON file could not be read");
    } catch (JSONException e) {
        Log.e(mLogTag, "GeoJSON file could not be converted to a JSONObject");
    }
}
Also used : GeoJsonLayer(com.google.maps.android.data.geojson.GeoJsonLayer) JSONException(org.json.JSONException) IOException(java.io.IOException)

Aggregations

GeoJsonLayer (com.google.maps.android.data.geojson.GeoJsonLayer)1 IOException (java.io.IOException)1 JSONException (org.json.JSONException)1