Choosing the right type of Layer

22 views
Skip to first unread message

Delphine Demange

unread,
Jul 27, 2017, 10:02:43 AM7/27/17
to mapsforge-dev
Hello,

I am developing a basic off-line desktop application with mapsforge.

I'd like to better understand the rationale behind the various kind of layers -- what's the simplest Layer that suits my needs.
Is there some documentation on this somewhere? I couldn't find the information in the source code, but maybe I'm missing something.

Typically, I'd like to use the "minimal" implementation of Layer that allows me to display a map file available on a local disk.

Thanks,
Delphine


Emux

unread,
Jul 27, 2017, 11:59:43 AM7/27/17
to mapsfo...@googlegroups.com, Delphine Demange
Do you mean tile or overlay layers?

Tile layers are for base map of offline map files or online raster tiles.

Have you checked the Samples in mapsforge-samples-awt?
It contains a simple desktop implementation covering both types.

There are also the various overlay layers (e.g. marker, polyline, etc.) seen in OverlayMapViewer.

--
Emux

Delphine Demange

unread,
Jul 27, 2017, 12:18:33 PM7/27/17
to mapsforge-dev, delphine...@gmail.com
Thanks for the prompt reply.

Sorry, I meant tile layers. I'm more comfortable with overlay layers.
Indeed, I started from the sample file in mapsforge-samples-awt, and the code does work just fine.

Problems started when I tried to minimize the code, which is when I realized I was not fully understanding what was going on :)

I was looking for more high-level documentation (i.e. specs or explanation about the concepts used in mapsforge), rather than just source code.
The presentation slides available at mapsforge/docs/ is kind of the things I'm looking for, but that would go in deeper details about the architecture of the lib.
 
So far, I understand that for offline maps, I need :
- a mapdatastore -- for storing map files
- a tile renderer, properly setup with an XML render theme
- add the tilerenderer to the mapview

but the details remain black magic for me.

Does such a documentation exists ?

Thanks,
Delphine

Emux

unread,
Jul 27, 2017, 12:27:12 PM7/27/17
to mapsfo...@googlegroups.com, Delphine Demange
You can start with the Getting-Started guide (same concept in all platforms).

Then proceed with the various samples to see all API usage.

Docs contain structured information about specific sections, like map writer, map file, render themes, etc.

BTW presentations are a bit old - Mapsforge has evolved much since then.

--
Emux

Delphine Demange

unread,
Jul 27, 2017, 12:38:21 PM7/27/17
to mapsforge-dev, delphine...@gmail.com
I remember this guide now. I think I had a look.
Indeed, this is useful. There are some differences with the desktop platform though.
Like, the MapView can't be set clickable, etc.
Anyway, thanks for the pointers, the prompt replies, and the hard work you do for mapsforge!

Delphine
Reply all
Reply to author
Forward
0 new messages