Download/cache osmdroid maps programmatically from Android app - android

Is it possible to programatically from an Android app to export maptiles from osm?
Or to force a specific area to be cached?
I am trying to create an app that can cache/download an area of the map programmatically so it can be available offline when needed.
It doesn't have to be osm but from what i've read doing it for google maps would violate theirs terms of service.
If someone could point me in the right direction i would appreciate it.
Thank you for you time.

Mobile Atlas Creator works perfectly, but having similar feature directly integrated in Android app would much simpler for end-users.
There is a thread about this subject in the osmdroid Discussion Group, here:
https://groups.google.com/forum/#!topic/osmdroid/u0SXXzqHg4U
If you want this feature, don't hesitate to "vote" for it in the Discussion Group thread (10 votes requested :-).

You are probably looking for something like Mobile Atlas Creator. But note that even "free" servers don't necessarily allow you to bulk-download tiles. See osm's Tile Usage Policy for example. Alternately, you can download the raw osm data and run your own Tile Server.

Related

I am developing an Android app with ArcGIS offline map support. For that which one I have to use? MPK or MMPK package? How to download it?

I am developing an Android app with ArcGIS offline map support. To work with an offline map in android what I have to download? MPK or MMPK? By which tool I can generate the corresponding package? Does anyone have previous experience on the same? I am using com.esri.arcgisruntime:arcgis-android:100.7.0 dependancy. The documentation are totally confusing for me. We have already purchased a Development builder starter license too. Any help would be appreciated.
There are two main ways to use a map offline.
Create a Web Map in ArcGIS Online and take that offline. This does not involve an MMPK.
OR: Create a MMPK using ArcGIS Pro (a desktop product for Windows)
I expect you might want to consider option 1?
Create and save a web map in ArcGIS Online.
In the Settings ensure it's enabled for Offline. You should also ensure the layers you're using are offline enabled.
Use the OfflineMapTask to generate and download the offline map.
This is explained here, but you might also find this technical session helpful.
If you need to go the other route of generating an MMPK, you will need ArcGIS Pro.
MPKs are not a format that Runtime supports.

Hybride Mobile App (Phonegap) map offline and routing

I'm currently developping a phonegap mobile application and I want to be able to add the functionnalities of a map.
The features I want in this map is :
can be used offline
can be used to routing the user from a point A to a point B
performant solution
Usable on Android 4 minimum
Free solution
Do you know any solution that can be suitable for me? I have looked on internet but nothing is good as I want.
Thanks.

Android app with offline map and database

I made an android application with Google Maps using Maps API v2 and the app is getting the data from JSON generated by PHP from MySQL database. This works great while phone is connected to the internet.
My question is what is the best way to make app usable offline as well. I need just one small area for offline availability and I can download JSON to the phone storage and parse it but the map part is my main concern. As much as I read this won't be possible with Google Maps but what are the alternatives?
There's an open source Library available out there named OSMDroid which replaces Google MapView classes. It also includes a modular tile provider system with support for numerous online and offline tile sources and overlay support with built-in overlays for plotting icons, tracking location, and drawing shapes.
You can follow this link.
OR
You can follow Mapsforge which provides free and open software for OpenStreetMap-based applications,offers a library for ad-hoc map rendering on Android devices
Go through this link for mapsforge usage

Store map tiles inside my app

I'm using PhoneGap (3.0) to build an Android/iOS application.
The application revolves around maps and I came to the conclusion that loading tiles from a distant service like OpenStreetMap for example is way too slow and depends too much on 3G.
Is there a way to store tiles inside my application?
If yes, where can I find some documentation, code snippets, etc?
This depends on whether you are planning to use your own custom maps or want to use a 3rd party mapping service and therefore want to cache their tiles offline.
In the first case, I have some experience of this; I've produced a series of guided walk apps which use large custom maps I drew in Adobe Illustrator. See my stackoverflow question and subsequent answer for details, but in summary I used a tool called pngnq to create highly compressed 256 colour 8-bit PNG tiles of my maps which were small enough that I could bundle several zoom levels of tiles along with each app. I ended up implementing a custom mapping solution to enable fast enough performance of map scrolling and zooming when using my Phonegap app on older Android devices.
In the latter case, if you plan to store 3rd party tiles offline, you should first check that you aren't violating the terms of use - some mapping providers specifically prohibit offline caching of their map data.
Assuming this is OK, you may want to consider using leafletjs to power your maps. You may want to check out this blog article on HTML5 Offline mapping and this Phonegap-specific one. Both have links to proof-of-concept apps on GitHub where the source code is available.
Hope this helps!

Android app - tracking user location and plotting to google map?

How difficult would it be to get a user's location and map it live onto a google map along with the time to complete the route?
As well as this, when the user completes the route, he or she can save it and upload it to a server, others can then download that route and time themselves against it?
It's a bit more involving that that, but would be interested to know how difficult something like this would be to achieve?
I have limited PHP and C# experience so am not a complete novice to coding but have never developed for a mobile platform before..
It shouldn't be Mission Impossible. This link provides everything you need. It uses a Google Maps service that is providing the routes data in [KML] format.
Hope this will help you. Good luck!

Categories

Resources