Project Url: Nextome/GeoJsonify
Introduction: Easily add GeoJson layers to your Maps
More: Author   ReportBugs   OfficialWebsite   

Simply add GeoJson layers to your Maps

Supported Map Services:

How to use

  1. Add JitPack in your root build.gradle at the end of repositories:
     allprojects {
         repositories {
             maven { url '' }
  2. Add the dependency in your module build.gradle: ```gradle dependencies {
         compile 'com.github.Nextome:GeoJsonify:v1.0.0'

3. Simply use the method:
GeoJsonify.geoJsonifyMap(map, List<Uri> jsonUris, int color, Context context);
  • map is the map where the layers will be added. It can be a GoogleMap (Google Maps) / MapboxMap (Mapbox) / MapView (OSM)

  • jsonUris is a list of URIs, each one with a different .geojson file to parse.

  • color is the color of the lines that will be rendered.

Alternativly, you can also specify a different color for each layer using

GeoJsonify.geoJsonifyMap(map, List<Uri> jsonUris, List<Integer> colors, Context context);


Available here.

Example (Google Maps)

Here's a full Google Maps implementation:

public class GoogleMapsActivity extends MapBaseActivity implements OnMapReadyCallback {

    protected void onCreate(Bundle savedInstanceState) {

        SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()

    public void onMapReady(GoogleMap googleMap) {
        Uri uri1 = Uri.fromFile(new File(Environment.getExternalStorageDirectory().getPath() + "italy.geojson"));
        Uri uri2 = Uri.fromFile(new File(Environment.getExternalStorageDirectory().getPath() + "puglia.geojson"));

        List<Uri> URIs = new ArrayList<>();

        try {
            GeoJsonify.geoJsonifyMap(googleMap, URIs, Color.BLACK, this.getContext());
        } catch (IOException e) {
            Toast.makeText(this.getContext(), "Unable to read file", Toast.LENGTH_SHORT).show();
        } catch (JSONException e) {
            Toast.makeText(this.getContext(), "Unable to parse file", Toast.LENGTH_SHORT).show();

For more examples with all services, see our example app GeoJson Viewer

GeoJson Viewer

View GeoJson files on your Android Device

Get it on Google Play

How to use

Simply choose a GeoJson file on your device and select a map provider from the list.

Supported Map Services:


Map with Polygons, Lines and Points

Different Services

Same .geojson file opened with Google Maps, Open Street Map and MapBox

How to build the project

  • Clone the project;
  • Open Android Studio and select Import Project;
  • Add your own Google Maps and Mapbox API keys in strings.xml;

We'll also be happy to accept your pull requests.

Read More

Read more about adding a GeoJson layer on maps on our blog.

Install the app

GeoJson Viewer is available for free on Google Play.


GeoJson Viewer is licensed under the Apache License 2.0.

Made at Nextome.

Support Me
About Me
Google+: Trinea trinea
GitHub: Trinea