is the google maps api key in use with geocoding and does it work without this key?
You're referring to Google's HTTP
Geocoding API there i guess and not the b4a
Geocoder library?
Read the
API key documentation on that page.
It states:
All Geocoding API applications should use an API key.
- Enables per-key instead of per-IP-address quota limits.
Notice the use of the word
should.
Further down the page is an example HTTP geocode request, i removed the (blank) API key part of the request and tried it in my browser.
It works without an API key.
https://maps.googleapis.com/maps/ap...eatre+Parkway,+Mountain+View,+CA&sensor=false
So i think if you use an API key then your API key allows up to 2500 geocode requests in any 24 hour period.
And if you do not use an API key then geocode requests are limited based on the IP address of the device that made the request.
Does that mean that every IP address can make up to 2500 geocode requests in any 24 hour period?
I'm not at all sure.
You'd have to read through all the documentation and terms and conditions of use to try and find an answer.
But be sure to read the
Usage Limits part of that webpage:
The Geocoding API may only be used in conjunction with a Google map; geocoding results without displaying them on a map is prohibited.
If you stop using a GoogleMap and switch to an OSMDroid map you're no longer allowed to use the Geocoding API service.
It might be worth taking the time to see if there's any other
online geocoder services available.
So my second question: what are the biggest differences between them
GoogleMaps is (i think) a much more professional library.
GoogleMaps is supported by the massive Google infrastructure - tiles for your GoogleMap are served by massive server farms that serve tiles very quickly.
You're very unlikely to ever find a GoogleMap not responding because the tile server is overloaded.
OSMDroid is much less professional.
You have a choice of tile sources but these are mostly (or wholly) served by single tile servers where a single tile server must serve all tile requests.
Often these tile servers become overloaded and your OSMDroid map will hang waiting for tiles from the tile servers.
is it possible to have the cards of germany and austria on the mobile device
It's possible but not always practical.
First you need a source of tiles - if you want to add an offline tile archive to your app you first need the tiles with which you'll create your offline tile archive.
Take a look here:
http://code.google.com/p/osmdroid/wiki/MobileAtlasCreator.
MobileAtlasCreator (MOBAC) is a tool that can download tiles from tile servers and package them into an archive ready to use with your app.
You choose a rectangular area of the earth, choose which zoom levels you want to include and MOBAC downloads and packages your tiles into an archive.
Choose a large area and/or choose lots of high zoom levels and you'll run into problems:
- The tile servers that MOBAC is downloading the tiles from may temporarily block your IP address for requesting too many tiles in a short period of time.
You can work around this as MOBAC has settings that let you limit how many tiles it requests at a time.
- Your offline tile archive will soon become massive.
It might become a few hundred MBs in size or even a GB or more.
How will you make the offline tile archive available to your OSMDroid map?
- A small tile archive can be included in the compiled APK.
- A large tile archive would ideally be hosted on a server and once your app is installed it would download the tile archive to the device.
This makes using a large tile archive possible but at some point you'd have to decide how large an archive it is practical to download.
Few users of your app are likely to want to download hundreds or thousands of MBs of offline tiles.
An alternative to an offline tile archive is to render your own tiles on the android device.
Have you looked at the
MapsForgeTileProvider for use with the GoogleMaps library?
I have a version of the MapsForgeTileProvider that works with OSMDroid.
So you could create a map database conatining binary data that covers the area you wish to display and use the OSMDroid MapsForge library to render tiles on the fly on the device from this maps database.
The library isn't perfect - read the post on the GoogleMapsExtras thread where i detail it's faults.
But if you'd like to try using MapsForge on an OSMDroid map you'll find the library files and an example project here:
http://b4a.martinpearman.co.uk/osmdroid/MapsForgeTileSource.zip.
So offline mapping with OSMDroid is possible using either an offline tile archive or the MapsForge library.
Offline mapping is also possible with GoogleMaps using MapsForge library.
Whether you use offline tiles or MapsForge you will inevitably find that offline mappping requires a hundred or more MBs of tiles or data to be transferred to the device.
Martin.