Using OSM to develope android app - android

I have just started programming in JAVA and Android. I have been able to make an android app in which i store markers in a MySql database which i fetch using PHP and display them in a map overlay. Also i have allowed adding markers to the database as well. I am doing all this using Google Maps API and i would also like to do the same using Open Street Map. I would be thankful if anybody gave me some hints on how to do this or some links that would be useful to me. Thank you in Advance.

Take a look at Mapsforge (http://code.google.com/p/mapsforge/). It is designed to be a near drop-in replacement to Google Maps. It's not completely trivial, but they have a sample app in the source code, which shows the basic moves to accomplish some common results.
Another option is Osmdroid (http://code.google.com/p/osmdroid/). The main difference being that with Mapsforge you download a map file and render it on the device, so maps will be available even without a data connection. Osmdroid downloads tiles from OSM, much like Google Maps API does from Google Maps.

Related

Android application of maps.me API

I want to Show the map on my app as offline so that am using the API name as Maps.me
On after using its API I got my app which displays the current city on clicking that particular city it downloads the map from net and show it in offline.
But my Query is on clicking the capital it just redirect from my app to mapsme app and showed the map but i want to show the map in my app.
How can i do it anyone have an idea share me.
For that you may have to modify source code of maps.me. As natively maps.me does not support other apps. I also tried to figure out if we can use it but could not do it. So right now I am modifying Maps.me code and building a wrapper over it and integrate it in my app.

Offline Open Street Map in Android

I have a project that has a requirement of displaying map data in offline mode also. I have used OpenStreet maps. I have downloaded .PBF file for my area . I want to access these map file from android application. I also visit these links:
How to create map tiles from OpenStreetMap offline, display it on Android?
PBF Format
I am a newbie in Android developing so excuse me about my elementary question. Can anybody guide me how I use .PBF file and solve this problem?
Use a library that supports offline OSM maps, for example mapsforge or the Mapbox Android SDK. For more information consult the OSM wiki about offline OSM and Android libraries.

Shown Map from Sqlite in Android

I am currently trying to import an offline map to Nutiteq. I have downloaded a map from OpenStreetMap but that map has an .osm extension. I have map database create from mobile atlas center. How I can load in map view?
The slideshare tutorial is from 2009, and it is outdated. Here are some hints:
Latest getting started tutorials can be found from https://developer.nutiteq.com/getting-started .
Latest Nutiteq SDK uses OpenStreetMap maps automatically, offline and online, you do not need to download any extra maps. For offline use case there is a guide here: https://developer.nutiteq.com/guides/offline-maps
Nutiteq supports also mbtiles, see https://developer.nutiteq.com/guides/mbtiles . Note that offline maps require Pro plan for the SDK.

Issues displaying embedded Google map on Android and iOS

I created a 'My Map' in google and embedded it into my wordpress site.
The map displays fine on desktop. On android it displays, but a box with all the locations hides most of the map and it doesn't seem to be responsive. On an iphone the map simply doesn't display.
Is there any code I need to add to resolve this? Thanks
you need to look on to this (https://developers.google.com/maps/documentation/android/). It provides all the steps you need setup google map on android. For iphone, i didn't familiar with that.

choosing right approch to implement google map in android

I am planning to create an application in android which has following features
Show Source to Destination Route
Show Reverse Route
Show Traffic Data
Show alternate Route
Store user data
apart from that i want to use some android native controls such as image button , textbox , dialog over the map.
Now after reviewing this link i am bit confuse in choosing the approach among
Google Maps API V3 in the Browser
Google Maps API V3 in a Browser Embedded in a Native Application
Native Google Maps APIs
Can anyone please help me out in choosing the right approach ?
Well, there's no simple answer to that. Every approach has its pros and cons.
Now let me state few insights that might help you in your decision (based on the idea that you want the map as a part of a native android app, not just a html5 app - correct me if I'm wrong):
You need to store user data.
If you want to store the data in the app, then I guess you can leave out the first solution. It would be very difficult (or even impossible) for you to properly maintain your data with map in a browser. The best way to maintain data is then to directly communicate with a server from the webpage and store data on the server (so you need a server backend). You can also pass some data from the webpage to an activity by registering an intent filter for your own url schema.
You don't have such problems using approach 2 and 3, where you can use android code (if you are embedding the map in a webview you can access android code by binding javascript code to android code).
You want to use android native controls.
Now you can also leave out the 1st solution, you are using browser controls there. In the 2nd solution, you can use both (the map needn't fill the entire screen and you can also place controls over the webview).
Google Maps API v3 is frequently updated and currently much more comfortable than native API. Native API wasn't much updated (not sure if it was updated at all) since Android 1.6.
From these 3 points I would prefer embedding Google Maps API V3 in a webview. Of course, I might have missed some important features of your app.

Categories

Resources