Offline map (.obf file) in android? - android

I want to include a MapView in my Application. I have been playing around with the Google Api a bit and it worked quite well.
But now I want to have a map completely offline. I know there are a lot of possibilities to do this.
The problem is that I have maps with .obf extension not zip. It should be possible to zoom in and out and to set markers at specific locations.
I know that there are things like Osmdroid. But I can't find any tutorial to load .obf file.
Thank you in advance.

I suggest you to have a look at OsmAnd.
It works with .obf format and provides you offline navigation.
OsmAnd

Related

Interactive Map without Google maps

I have a huge plan of a site (the plan is just a picture), the problem is that Google Maps, can't have access to it, so I need to add markers in this picture (Plan), My question how to that ? how to make a picture interactive ? how to add markers ?
Really I have no idea, I saw indoor of Google Maps, but it's not what my custmer need.
Thank's !
this is a small example
you may give this library a try or see its demo here: https://leafletjs.com
it's a pure javascript library that may be used with any web platforms
wish it to be helpful.

Graphhopper, osmdroid for osmdroid offline routing

I have been messing around for a while with osmdroid and osm bonus pack(amazing libs!), and have been pondering on the idea of offline routing and turn by turn navigation, now, I haven't tried anything yet, but something sounds very promising in throwing graphhopper in on the mix:
The official Wiki guide is as following:
Download a raw map file(.osm, .osm.pbf, etc.).
Run ./graphhopper.sh import map_file
Now, this is designed to work with MapsForge, and I haven't had the chance to check out the resulting .ghz file, containing the routing data for the map, BUT my question is this, could it be possible to use this routing data to build a PathOverlay object coming in OSM Bonus Pack to actually draw routes of some kind?
I wonder if someone already tried something of this sort and has something to say about it, any help appreciated.
Using Mapsforge in osmdroid: holy grail, never-ending story...
You can have a look at this (long) thread: https://groups.google.com/forum/#!topic/osmdroid/gSieR9BF_z0
There is also this working experiment: http://www.salidasoftware.com/how-to-render-mapsforge-tiles-in-osmdroid/
Now, if you really NEED offline routing, your options are:
You leave osmdroid/OSMBonusPack and move to Graphhopper/Mapsforge, as suggested by Karussell => you will find docs on Graphhopper web site.
Or you can have a look at OsmAnd. This is an app, not a lib. It has its own vector-based maps format (and toolset) and provides offline display and offline routing.
Or you can try to reach the holy grail, and merge Mapsforge, osmdroid, Graphhopper, and OSMBonusPack...
The holy grail is possible, you can use osmdroid with vector maps and yes, GraphHopper works on Android, but be ready for OOM on low-end devices - GraphHopper requires a lot of memory.
My sample project should be a good point to start.

Android Map Clustering Using Polaris 2

I'm making an app for android and I'm using an android map to show about 15k markers from a WebService, the map gets really slow, I have searched around and find a solution "Clustering" but I can't implement it in my app, my map is running with the lib "Polaris 2" and I tried "ClusterKraf", but I had no results.
If someone has a better way to show the markers or some way to make clustering please help me.
I have been using Android Map Extensions and Clusterkraf, but finally decided implement the clustering by my self. The clustering could be written in a very simple way and you could get more control in how the elements are showing in the map, etc.
You can read my implementation of clustering in http://arnaldog.wordpress.com/2013/07/31/simple-clustering-with-android-maps-v2/.
I hope that helps you.
Polaris 2 does not have clustering implemented.
Both Clusterkraf and Android Maps Extensions mentioned by iaindownie have demo app on Google Play, which are also open source, so you can download the code from their project sites to try working solution. Then you can copy relevant code into your project.

How do I add markers to streets only - Android Development

After plenty of searching, I haven't yet found a solution that works for me and I'm really hoping someone here could help me. First I'll explain my problem, and then I'll mention some of the approaches I've attempted/considered so far.
Basically, I'm developing an Android app where markers randomly appear around the user's location. The catch is, the markers need to be placed on streets only.
I've been working with Google Maps Android API V2 but I'm trying to work around using anything with "limitations" such as 'geocoding'.
I've considered using different map API's such as Nutiteq but I've had some trouble implementing them. It would be nice to stick to Google since I've become familiar with it but I'm willing to try any suggestions you may have.
I have even considered loading up Google Maps API V3 in an html file so that I can use GDirections to load a path from one point to itself and then parse this data to Google Maps Android API V2 using JS but turns out GDirections has a limit as well.
Anyone have any idea how I can go about doing this? Even if the solution is hacky, it's still something.
I'm fairly new to Android Development.
Funny what you want to achieve. You don't need to load API V3 html. You can use directions api directly: http://maps.googleapis.com/maps/api/directions/json?origin=51,19&destination=51,19&sensor=false
It still has limitations, but is was like 2000 or something a day a device. And you don't want to put more than 2000 markers on single user's screen, do you?
This is easy to parse, for example with Gson.

Too many markers Google Maps

We added about 200 new markers in the MapView.
Now the app stucks and you cant use the MapView.
I heared about MarkerClusterer but did not found any more inforamation how to use MarkerClusterer with Android...or are there better solutions?
Can anyone give me a link or write a little turorial?
Thanks :)
You can have a look at this example Android project https://github.com/igorab/ManyPinsProject
It shows limited amount of markers depending on MapView zoom level.
Here is tutorial from Google https://developers.google.com/maps/articles/toomanymarkers
As #CommonsWare said it is only for JavaScript version or GoogleMaps, but may be you can find something useful there. For example, they have a link to MarkerClusterer js source code. Maybe you can find a way to adopt it to Android.
You can use this library – Android MapView Balloons. This project provides an easy way to annotate map overlay items with a simple information balloon when using the Android Maps.

Categories

Resources