Auto selection of Map file depending on location

47 views
Skip to first unread message

John Rellis

unread,
Mar 21, 2013, 8:41:16 PM3/21/13
to mapsfo...@googlegroups.com
Hey,

If I have a number of maps downloaded onto my android device is there any way to select the correct map file for my current location?

Right now I have a setting that lets the user select Ireland.map or California.map, it would be great if there was some way to do this automatically.

Do the map files store any meta data that is accessible to allow me to do this?  Like bounding lat/longs or something like that??

Many thanks,
John

Thilo Mühlberg

unread,
Mar 22, 2013, 3:01:47 PM3/22/13
to mapsfo...@googlegroups.com
Hi John,

aach map file contains some meta data about its content. See
SpecificationBinaryMapFile [1] for the low level details.

The MapView.getMapDatabase() method returns a MapDatabase for the
current map file. If you call MapDatabase.getMapFileInfo() you have an
object which contains all available meta data for the map file. [2]

Automatically switching between different map files based on your
location or the displayed map on the screen is not (yet) possible.

Best regards,
Thilo

[1] https://code.google.com/p/mapsforge/wiki/SpecificationBinaryMapFile
[2] This explanation is for version 0.3.0 of the mapsforge-map library.
> --
> You received this message because you are subscribed to the Google
> Groups "mapsforge-dev" group.
> To unsubscribe from this group and stop receiving emails from it, send
> an email to mapsforge-de...@googlegroups.com.
> For more options, visit https://groups.google.com/groups/opt_out.
>
>


signature.asc

Neil Boyd

unread,
Mar 25, 2013, 1:47:51 AM3/25/13
to mapsforge-dev
The map header contains the bounding box, but not the bounding
polygon.

There's no space in the header for storing arbitrary data, so you
can't just put it into the header.

I also want to do the same thing as you, but the only way I found was
to know the polygons from some other way than reading the map file.

Neil

John Rellis

unread,
Mar 27, 2013, 11:35:20 AM3/27/13
to mapsfo...@googlegroups.com
Thanks for the responses. If I can get at the bounding box maybe I can get something to work!

--
You received this message because you are subscribed to a topic in the Google Groups "mapsforge-dev" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/mapsforge-dev/j-zSCJ3Y3Jc/unsubscribe?hl=en-US.
To unsubscribe from this group and all its topics, send an email to mapsforge-de...@googlegroups.com.

For more options, visit https://groups.google.com/groups/opt_out.





--
John Rellis
Reply all
Reply to author
Forward
0 new messages