treee111 / wahooMapsCreator

Create maps for Wahoo device based on latest OSM maps
GNU General Public License v3.0
259 stars 26 forks source link

Multiple symbols shown for one POI #159

Closed masc4ii closed 2 years ago

masc4ii commented 2 years ago

Expected Behavior

For a POI, one symbol should be displayed on the screen.

Current Behavior

For some POIs, the symbol is displayed multiple times. This happens e.g. for POIs on larger buildings, and when zooming in. For POIs with the tag "type=multipolygon" the symbol will move on the entire screen like a ghost, when moving with your bike (e.g. castle of Schmalkalden, tile 135/86).

Steps to Reproduce the Issue

  1. Search for a POI on a large building. Maybe use cruiser application - that is easier and shows the bug too. If you create the map including historic-castle, the castle of Schmalkalden will show the bug, same as many many castles in Italy Toskana. But also many café's in "way"-items in nearly all cities will show the bug.
  2. zoom in -> multiple same symbols are displayed for one POI
  3. for castle of Schmalkalden: move the map and the "ghost castle" will be displayed.

Context

I think, the bug will happen for "add-more-pois" branch. Not sure for your main branch.

Solution

In wahoomc/resources/tag_wahoo_adjusted)/tag-wahoo-poi.xml, add for all POI lines label-position="true" It should look like this:

  <!-- ************* POIS *************** --> 
  <pois>
        <osm-tag key="amenity" label-position="true" value="fuel" zoom-appear="14" /> 
        <osm-tag key="amenity" label-position="true" value="cafe" zoom-appear="14" /> 
...
  </pois>
  <ways>
        <osm-tag key="amenity" label-position="true" value="fuel" zoom-appear="14" /> 
        <osm-tag key="amenity" label-position="true" value="cafe" zoom-appear="14" /> 
...

Now the symbol will be displayed just once per, and exactly in the middle of the POI item. (Maybe it is just needed for "ways" and not for "pois" - to be tested.)

masc4ii commented 2 years ago

I did more testing: what I wrote above is needed for ways (often polygons) only, and not for pois (is a point already).

Before:

Bildschirmfoto 2022-10-27 um 20 23 44

After:

Bildschirmfoto 2022-10-27 um 20 24 06

Before: (castle in the middle of the picture is moving, when moving the map)

Bildschirmfoto 2022-10-27 um 20 28 06

After:

Bildschirmfoto 2022-10-27 um 20 28 23
treee111 commented 2 years ago

Hi @masc4ii,

nice detailled finding and input for making it better! Seams that it comes with the ways-tags.

I had a little hustle to find the position of your example, but with the coordinates I finally found it. Reproduction was relatively straight forward.

I made this 3 examples confirming your suggested solution:

  1. branch develop, zoom 50m in cruiser: grafik

  2. branch add-more-pois zoom 50m in cruiser: grafik

  3. branch add-more-pois zoom 50m in cruiser and label-position="true" for cafe way-tags: grafik

Given this series, I thinkg adding label-position="true" for way-tags makes sense!

Yesterday morning I had a similar experience with this cemetery: https://openstreetbrowser.org/#map=17/48.89035/9.39906&categories=public%5Btype%3Damenity%253Ddrinking_water%5D

I have the same output when using

label-position="true" doesn't help here and seams not to be similar to your findings.

Is this another story and OK that there are so many symbols?

masc4ii commented 2 years ago

It looks like there are so many symbols already in OSM data. Here I have no solution yet. Same for this castle here - I think one symbol would be enough - but there are 4 tags added, so 4 symbols shown: https://www.openstreetmap.org/way/58883585

Bildschirmfoto 2022-10-30 um 21 49 56
treee111 commented 2 years ago

that were also my thoughts about that. So I'll add your suggestion to the ways-tags :-)

treee111 commented 2 years ago

fixed via #158