LocationMapViewer

From OpenStreetMap Wiki
Jump to: navigation, search
Available languages — LocationMapViewer
· Afrikaans · Alemannisch · aragonés · asturianu · azərbaycanca · Bahasa Indonesia · Bahasa Melayu · Bân-lâm-gú · Basa Jawa · Baso Minangkabau · bosanski · brezhoneg · català · čeština · dansk · Deutsch · eesti · English · español · Esperanto · estremeñu · euskara · français · Frysk · Gaeilge · Gàidhlig · galego · Hausa · hrvatski · Igbo · interlingua · Interlingue · isiXhosa · isiZulu · íslenska · italiano · Kiswahili · Kreyòl ayisyen · kréyòl gwadloupéyen · Kurdî · latviešu · Lëtzebuergesch · lietuvių · magyar · Malagasy · Malti · Nederlands · Nedersaksies · norsk bokmål · norsk nynorsk · occitan · Oromoo · oʻzbekcha/ўзбекча · Plattdüütsch · polski · português · português do Brasil · română · shqip · slovenčina · slovenščina · Soomaaliga · suomi · svenska · Tiếng Việt · Türkçe · Vahcuengh · vèneto · Wolof · Yorùbá · Zazaki · српски / srpski · беларуская · български · қазақша · македонски · монгол · русский · тоҷикӣ · українська · Ελληνικά · Հայերեն · ქართული · नेपाली · मराठी · हिन्दी · অসমীয়া · বাংলা · ਪੰਜਾਬੀ · ગુજરાતી · ଓଡ଼ିଆ · தமிழ் · తెలుగు · ಕನ್ನಡ · മലയാളം · සිංහල · ไทย · မြန်မာဘာသာ · ລາວ · ភាសាខ្មែរ · ⵜⴰⵎⴰⵣⵉⵖⵜ · አማርኛ · 한국어 · 日本語 · 中文(简体)‎ · 吴语 · 粵語 · 中文(繁體)‎ · ייִדיש · עברית · اردو · العربية · پښتو · سنڌي · فارسی · ދިވެހިބަސް
LocationMapViewer
Screenshot of LocationMapViewer
Author: klaus3b (k3b)
Website: https://github.com/k3b/LocationMapViewer/wiki
Source code: https://github.com/k3b/LocationMapViewer
Version: 0.3.4.160330 (2016-12-08)
Install:
License: GPL (free of charge)
Platform: android (android-2.3.7 and up)
Programming language: Java

A serviceprovider that allows other apps to show "points of interest" in a map through a simple intent-api.

A serviceprovider that allows other apps to show "points of interest" in a map through a simple intent-api.

Features

Example Usage

This android java code will show a map with 3 markers:

        Intent mapIntent = new Intent();
		
		// we want to view the map
        mapIntent.setAction(Intent.ACTION_VIEW);

		// this will be shown as primary marker in the map
		// the coordinate 53.2,8.8 is in north germany where the map is centered around
		// z=1 means zoomlevel=1 showing the continent
		// the marker's caption will be "primary marker"
        Uri uri = Uri.parse("geo:53.2,8.8?q=(primary+marker)&z=1");
        mapIntent.setDataAndType(uri, null);
		
		// this is the maps Caption
        mapIntent.putExtra(Intent.EXTRA_TITLE, "Hello Map");
		
		// the map will contain 2 additional point of interest
        mapIntent.putExtra("de.k3b.POIS",
                  "<poi ll='53.1,8.9'/>\n" +
                  "<poi ll='53.3,8.7' n='Say Hello' \n" +
                        " link='https://github.com/k3b/LocationMapViewer/' \n" +
                        " d='This will be shown as a Marker. When clicking on the marker you " + 
						"get this text and a link to LocationMapViewer' />");

        try {
            startActivityForResult(Intent.createChooser(mapIntent,"Choose app to show location"), 4711);
        } catch (Exception e) {
            e.printStackTrace();
        }

GeoIntentDemoActivity.java is the sourcecode of a complete android demo app that uses LocationMapViewer (or any other provider that supports "geo:" uris)

Minimal requirements:

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

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 downloading mapdata
  • 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

Note: the app that uses LocationMapViewer via the intent api does not need these permissions.

Resources

A Photo Manager is based on the libraries