All Projects → Nextome → Geojsonify

Nextome / Geojsonify

Licence: apache-2.0
Easily add GeoJson layers to your Maps

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Geojsonify

Geo Maps
🗺 High Quality GeoJSON maps programmatically generated.
Stars: ✭ 1,098 (+678.72%)
Mutual labels:  geojson, maps
Obaddon
A repository of community-built prefabs and other enhancements for Oblige 7.70
Stars: ✭ 81 (-42.55%)
Mutual labels:  mapping, maps
Magrit
♠ Thematic cartography ♠
Stars: ✭ 60 (-57.45%)
Mutual labels:  mapping, maps
Lenz
Console based MAP 🗺 : with lots of features 🤩
Stars: ✭ 51 (-63.83%)
Mutual labels:  mapping, maps
Here Android Sdk Examples
Java-based projects using the HERE SDK for Android.
Stars: ✭ 127 (-9.93%)
Mutual labels:  mapping, maps
Here Ios Sdk Examples
Objective-C and Swift projects using the HERE SDK for iOS.
Stars: ✭ 52 (-63.12%)
Mutual labels:  mapping, maps
Examples
Self-contained examples for the legacy Maps API for JavaScript.
Stars: ✭ 78 (-44.68%)
Mutual labels:  mapping, maps
Joctomap
Java/Android wrapper for Octomap: an octree-based mapping library
Stars: ✭ 11 (-92.2%)
Mutual labels:  library, mapping
Kepler
The open source full-stack geosocial network platform
Stars: ✭ 125 (-11.35%)
Mutual labels:  mapping, geojson
Leaflet Tilefilter
Change the appearance of Leaflet map tiles on the fly using a variety of canvas or CSS3 image filters. It's like Instagram for Leaflet map tiles.
Stars: ✭ 90 (-36.17%)
Mutual labels:  mapping, maps
Permissionsflow
A simple library to make it easy requesting permissions in Android using Kotlin Coroutines.
Stars: ✭ 49 (-65.25%)
Mutual labels:  library, android-application
Mapbox Gl Native Android
Interactive, thoroughly customizable maps in native Android powered by vector tiles and OpenGL
Stars: ✭ 135 (-4.26%)
Mutual labels:  geojson, maps
Ngx.leaflet.component
angular 2+ / leaflet 1.x component collection
Stars: ✭ 46 (-67.38%)
Mutual labels:  library, maps
Gwt Ol
GWT wrapper for OpenLayers 3+ using JSInterop
Stars: ✭ 57 (-59.57%)
Mutual labels:  mapping, maps
Svg World Map
🗺 A JavaScript library to easily integrate one or more SVG world maps with all nations (countries) and second-level political subdivisions (countries, provinces, states).
Stars: ✭ 38 (-73.05%)
Mutual labels:  mapping, maps
Editor
An open source visual editor for the 'Mapbox Style Specification'
Stars: ✭ 1,167 (+727.66%)
Mutual labels:  mapping, maps
Leku
🌍 Map location picker component for Android. Based on Google Maps. An alternative to Google Place Picker.
Stars: ✭ 612 (+334.04%)
Mutual labels:  library, maps
Leaflet Dvf
Leaflet Data Visualization Framework
Stars: ✭ 678 (+380.85%)
Mutual labels:  mapping, maps
Geoswift
The Swift Geometry Engine.
Stars: ✭ 1,267 (+798.58%)
Mutual labels:  geojson, maps
Maps Api For Javascript Examples
Self-contained examples for Maps API for JavaScript v3.
Stars: ✭ 130 (-7.8%)
Mutual labels:  mapping, maps

GeoJsonify

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 'https://jitpack.io' }
		}
	}
  1. Add the dependency in your module build.gradle:
	dependencies {
	        compile 'com.github.Nextome:GeoJsonify:v1.0.0'
	}

  1. 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);

Javadoc

Available here.

Example (Google Maps)

Here's a full Google Maps implementation:

public class GoogleMapsActivity extends MapBaseActivity implements OnMapReadyCallback {

    @Override
    protected void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        this.getIntentExtras(getIntent());
        setContentView(R.layout.activity_maps);

        SupportMapFragment mapFragment = (SupportMapFragment) getSupportFragmentManager()
                .findFragmentById(R.id.map);
        mapFragment.getMapAsync(this);
    }

    @Override
    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<>();
        URIs.add(uri1);
        URIs.add(uri2);
        
        try {
            GeoJsonify.geoJsonifyMap(googleMap, URIs, Color.BLACK, this.getContext());
        } catch (IOException e) {
            e.printStackTrace();
            Toast.makeText(this.getContext(), "Unable to read file", Toast.LENGTH_SHORT).show();
        } catch (JSONException e) {
            e.printStackTrace();
            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:

Examples

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.

Licence

GeoJson Viewer is licensed under the Apache License 2.0.

Made at Nextome.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].