Skip to content

xinxinxinxinxin/LocationMapViewer

 
 

Repository files navigation

#LocationMapViewer

An app that can display geografic info in a map. It has support for gpx and kml files and geo-uri-s and can work offline (without internet/wifi) once geodata is downloaded and cached.

Other Android apps can use LocationMapViewer through an Intent interface (see GeoIntentDemo.java ) or through html links like <a href="geo:0,0?q=53.0,8.0(Hello)">geo:0,0?q=53.0,8.0(Hello)</a>

Minimal requirements: Android 2.3.7 (API 10), internet/wifi-connection to download geodata and a SD-Card to cache geodata

Licence: GPLv3

Requred permissions:

  • INTERNET: to download map data from Open Streetmap Server
  • ACCESS_NETWORK_STATE and ACCESS_WIFI_STATE: to find out if wifi/internet is online to start downloaded geodata
  • WRITE_EXTERNAL_STORAGE
    • to cache downloaded map data in local file system
    • to load gpx/kml-Files to be displayed in the map
  • ACCESS_FINE_LOCATION and ACCESS_COARSE_LOCATION: to display my own location in the map, too

The code uses osmdroid library with osmbonuspack library to display maps from Open Street Map.

##Intent Interface

Other Android apps can use LocationMapViewer as plug-in/device-driver through an Intent interface or through html-a-href-links.

Examples:

  • uri=geo:... displays (and zomms to) a geo uri
    • geo:0,0?q=53.0,8.0(Hello)
      • displays "hello" at the location lat=53.0 north and lon= 8.0 east.
      • in html you can use <a href="geo:0,0?q=53.0,8.0(Hello)">geo:0,0?q=53.0,8.0(Hello)</a>
      • this format is compatible with google-maps for android
    • geo:53.0,8.0?q=(Hello)
      • displays "hello" at the location lat=53.0 north and lon= 8.0 east
      • this format is not compatible with google-maps for android
    • geo:53.0,8.0?z=6
      • displays a pin at the location using zoomlevel "6"
  • uri=file:/path/to/waypoints.gpx
    • displays a xml+gpx waypointfile
  • uri=file:/path/to/waypoints.kml
    • displays a vnd.google-earth.kml+xml waypointfile

LocationMapViewer is designed to be used by other apps. This means in Terms of GPLv3 that your app that uses the Intent-Iterface is not considered a Derived Work.

In other words: you can used LocationMapViewer as a driver for your non gpl/non opensource app..

About

Android App to view Location in a map

Resources

License

Stars

Watchers

Forks

Packages

 
 
 

Languages

  • Java 100.0%