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
Related
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.
I'm looking for a library to display a raster, host on my website, on an Android device.
I'm trying to do that with MapBox but I just read that:
At this time, the offline database format is private. In the future, we may publicly document the format and implement Mapbox Mobile APIs for consuming pre-built databases.
Does it mean I can only display the raster online?
Is there anyway to just point tiles' source to a internal folder?
Should I use OSMDroid instead of MapBox?
Thank you
You can use 4.2.0-beta.5 of our SDK and work off this example to add a raster layer from a web map service. I'm not sure what you mean by offline when you are requesting to add a web map hosted on your website.
I want to develop an android mapping aplication that enables users to navigate in the map:
my problem with using google maps API is that the area that I want to map is not detailed and I want to use the maps prvided by other server that has the map I want, or better if I could do it offline(the map is local and not from a server)
what are the best and easiest mapping API that are free licened, enable offline mapping, or enable using other server or OSM????
I found many API but these features I don't if they are supported, and I dont know what is the best(e.g mapquest api, decarta api, nutiteq api)
any help any opinion will be nice,
and thanks in advance.
You can use some of these libraries: osmdroid, mapsforge. Both of them provides interface to some internet map databases and allows to create your own maps provider.
They allows you to have (and handle) your offline cache, dynamic asynchronous maps loading, resampling on zoom, adding overlays and so on, like original MapView does.
Another good point of using these libraries is that they are well-designed for in-place substitution of google MapView.
Both of them are LGPL (you can use them in you commercial apps) and provide interface for OpenStreetMap out-of-the-box.
We need a graphical component (view) for rendering maps from any WMS services for Android andn iOS. My researches only show that there is basically only the Google Maps API available as Android/iOS library (MapView).
Before programming a WMS view lib by ourselves, are there any (free or licensed) WMS view libraries for those OSses available, which can be used in own apps? We tried using OpenLayers in a WebView, which is not really satisfying from a performance point of view.
thanks for your help
I think this will fit your requirements:
https://confluence.prodevelop.es/display/GVMN/Home
From their homepage:
gvSIG Mini is a free viewer of free access maps based on tiles
(OpenStreetMap, YahooMaps, Microsoft Bing, ...), with a WMS, WMS-C
client, address and POI search, routes, hybrid location and many more
things. It runs with both on/off-line modes.
While it is packaged as an application rather than a library, the source is available (GPL) so you should be able to extract what you need:
https://confluence.prodevelop.es/display/GVMN/Android+Download
https://svn.prodevelop.es/public/gvsigmini/
I have tried using Osmdroid API for this, but still without success. This requires modifying several java classes as XYTileSource and BitmapTileSourceBase.
osmdroid - OpenStreetMap-Tools for Android
There are applications in the Android Market that can make this work perfectly as OruxMaps but not have an API for development. : (
Nutiteq SDK can do this. WMS sample works with EPSG:4326, but SDK supports also other projections and you can modify the map class to use those. Disclaimer: I'm the developer of it.
Update in 2016: updated links, removed obsolete 3 year old references
Look at OpenStreetMap. It provides maps for both iOS and Android
http://wiki.openstreetmap.org/wiki/Apple_iOS
http://wiki.openstreetmap.org/wiki/Android
Api - http://wiki.openstreetmap.org/wiki/API_v0.6
Hope, this helps you.
We are using the openlayers client. Yes I know it's a Web Client but you can use it in your WebView.
http://openlayers.org/
https://openlayersbook.github.io/ch10-openlayers-goes-mobile/example-01.html
I have a few apps with openlayers maps. Some of these uses online map servers and some uses tiles stored inside the app (offline maps).
For interactions with webView, we use JavaScriptInjections
I want to develop a LBS app for Android,but I do not know how to begin the project.
I want to use the Google Map API to use the map data of Google.The user can also add information on map,and the information can show on the map.
(For example,an user find one street is not safe,then the street will be red on the map.)
And I use the MSSQL SERVER or Oracle to store the information,but I don`t know how to get and use the data when I need it,should I use a GIS Engine(like ArcGIS)?
How can I show the information on Google Map?And Which GIS Engine I should use?
I also have another idea to use the Google Maps Data API.
Anybody can give me some suggestions?Thank you very much:)
One of the solutions could be following:
You can use MSSQL Server 2008 or Oracle to store data. PostGIS is even better because it's free and has a solid spatial capabilities.
As GIS engine you could use Geoserver. It works with all databases mentioned above. From my own experience it works really good with PostGIS.
If you want a native Android app you can go ahead and use native Google Maps APIs and manually construct WFS requests in order to communicate with Geoserver when storing data in the database.
Another option is to built it as a webpage and use coming OpenLayers 2.11 javascript library which has great support for mobile devices. It's also great at constructing WFS requests so you won't need to handle this stuff manually. If you still want an Android map, you can use Phonegap to wrap you OpenLayers webpage into an app.