Does mapsforge support (raster/tile) base overlay and/or allow custom rendering ?

372 views
Skip to first unread message

simon thepot

unread,
Feb 3, 2011, 6:11:05 AM2/3/11
to mapsfo...@googlegroups.com
Hi mapsforge,
first of all, thanks for having taken the time to answer to my last mail on Vector features supported by mapsforge.

Im a newcomers in GIS technology, so I wonder (or not !) if my questions are relevant.

First of all, do you confirm that the map rendering is done at runtime by the mapsforge MobileMapRendering tool ?

Second, on rendering time, is there a way:
- to specify that we want to use a base tile overlay that is this raster or this directory structure Z/Y/X.png located on the sdcard to get the tile raster from ?
- or, to specify that we want the rendered tiles to be "transparent" ; and then, to specify/change the background overlay ?
- or else, to speciy that for some  closed shape geometry, we want to apply a specific image.

The goal is to make very specific designed maps.


Thanks a lot for your time and your great library,
Cheers,
Simon

ps:
Non related question to feed my curiosity : how come you choose  to make your overlays classes extends from the Thread class ? Wouldn't they just be "classic" class that will be ask to render themselves by some other "Thread" this time class ? Is there an impact on performance ? Thanks a lot.

simon thepot

unread,
Feb 4, 2011, 4:15:33 AM2/4/11
to mapsfo...@googlegroups.com
Hi again,

As I was writing the first mail of this post, I already had written the MobileMapRendering page and the Binary Format Specification one.
yet I want to point out one specific sentence:
From http://code.google.com/p/mapsforge/wiki/MobileMapRendering:
"It is possible to implement a custom render style and thus completely change the way the map looks. "

Is there some tutorial on how to custom this rendering style?

Thanks a lot,
Best regards,
Simon,

2011/2/3 simon thepot <simon....@gmail.com>

mueh...@inf.fu-berlin.de

unread,
Feb 5, 2011, 10:43:00 AM2/5/11
to mapsfo...@googlegroups.com, simon thepot
Hello Simon,

you are addressing different topics, but i will try to answer them all:

1) Yes, i confirm that the map rendering is done at runtime by the
mapsforge-map library. We do _not_ display prerendered images.

2) So far, we offer different types of map overlays to display
additional data _on top_ of the map (points, ways, polygons, ...).
Currently it is not possible to display the map as an overlay on top of
something else. There is no "underlay" functionality yet. If there is a
need for it, we could probably implement it. Making the map images
(semi)transparent would not be difficult, but require more memory.

3) As mentioned before, the overlay API is for displaying spatial data.
It does not yet support displaying static PNG images (or any other
raster format). Again, if there is a need for it, we can implement it.
As a user of the map library, you would probably have to extend an
abstract base class to implement some details like for example the
directory structure of your images (z/x/y.png or whatever).

4) We are already working hard on a high-level API to adjust the
rendering of the map images at runtime. See issue 31:
http://code.google.com/p/mapsforge/issues/detail?id=31
It will take some more weeks until we can publish it. In the meantime
you may star the issue to express your need for that feature. :-)

5) Overlays are implemented as Threads so that redrawing them (a
potentially long operation) doesn't block any of the other threads. The
concept fits nicely with the upcoming multi-core CPUs on mobile devices.
Having worker threads and assigning them overlays to redraw would be
possible as well, but more complex to implement. If we extend the Thread
class, developers can see the asynchronism from outside.

Best regards,
Thilo

signature.asc
Reply all
Reply to author
Forward
0 new messages