Is it possible to download map in runtime? - openstreetmap

I'm developing an Android application and I need to implement offline maps. For this I use OpenStreetMap, or rather osmdroid.
I need to implement the loading of maps when executing the program based on where the user is located. My question is, is it possible to load maps when I run the application and how do I do this?

Yes.
Off device, using MOBAC, you can follow this guide: https://github.com/osmdroid/osmdroid/wiki/Offline-Map-Tiles#mobile-atlas-creator-mobac
On device, using osmdroid, you can use the cache manager:
https://github.com/osmdroid/osmdroid/wiki/Offline-Map-Tiles#use-osmdroids-cache-manager-on-device---version-52
There are several links to examples and source code, such as the one in the osmdroid sample app, which is on the play store or available for download on github.
https://github.com/osmdroid/osmdroid/blob/master/OpenStreetMapViewer/src/main/java/org/osmdroid/samplefragments/cache/SampleCacheDownloader.java

Related

Use OpenStreet Maps in my blackberry application

I would like to use openstreet maps in my blackberry application. The idea is the application fetches the current location through GPS/cell tower. The user has an option to click on a button and load the map within the application (same display) below. I have researched a little and BlackBerry maps seem to be limited and Google Maps requires installing a seperate API. I am hoping to fetch and load the maps through http connection (something like a webservice). Can somebody please guide?
I use the nutiteq library its usefull and it implements the openstreet maps in my blackberry. Here are some links quick start nutiteq RIM BlackBerry Mapping API SDK

create and use google's kml file programmatically in xcode iphone

I am working on google maps and wanted to know if we can create the kml file and download it and use it in our code,I referred to sample KMLViewer by apple but it instruct you to open browser and manually do it,
Is there any way i can download it and use in my app.Any help would be appreciated.
I am looking for a solution on this as well. This SO question is relevant: Generate KML file within iphone app -- I think the way to do it is to use the Directions API from Google:
http://code.google.com/apis/maps/documentation/directions/

Possible to share SQLite DB between PhoneGap and Native code?

I am writing a native iPhone and Android app using Sencha Touch inside Phonegap and my client is very keen for me to include Analytics.
The application needs to function happily offline so I need an analytics solution that can remember activity occurring while offline and updating the server once online again.
My thoughts are to store events from within the JS to a store that can be checked at a regular interval on the device and posted to the server.
My question is whether a SQLite DB could be used for this using the Phonegap API and whether this DB could then be accessed from the native code?
I suspect not and that the best option would be to write to a text file.
Any thoughts or suggestions gratefully received.
The solution to this seems to be to write a Phonegap Plugin that lets you call a method from inside Phonegap to a method in your native application.

How to use native sqlite in ios' webview?

I just want to develop an ios app based on webview. The offline storage must be used. I know that html5 offline storage is supported by webview. But I just want to use a native sqlite file(not the one embedded in webkit) just like other native ios app. So could anyone please give me some clues?
Are you implementing the database via javascript? If so check out this great free eBook on building iPhone apps. The chapter about Client-Side Database should give you a running start.
http://ofps.oreilly.com/titles/9780596805784/ch05.html#ch05_id35933084
regards
Andrew
webSQL is available in UIWebViews.
However, if you're using Cordova the convention is to use the SQLite plugin. GIYF.
I personally like using web storage wrappers for this. Lawnchair.js and persistence.js were earlier wrapper solutions, but I like using Mozilla's localForage the most. It makes storing any kinda JS primitive/object/blob really easy.
localForage is just a wrapper over localStorage, webSQL, and SQLite. It has a really simple API and will choose the best web db for you based on what you wanted to store (was it serializable: localStorage. was it a [file Object] from an HTML input: webSQL). Your project can be a Cordova project or whatever. Don't matta. It'll work.

Suggestion needed for iPhone Map based App Development?

Hii friends,
i have to create a routemap for a university using maps as i preferred to use Google Maps API to develop it, as it seems easy for me with previous experience with maps API.
Does any Map library available for iPhone beyong google maps?
hey do try Route Me and open source library
http://mobileorchard.com/route-me-an-open-source-map-library-for-iphone-developers/