zbycz / osmapp

Lets make a universal app for OpenStreetMap
https://osmapp.org
GNU General Public License v3.0
219 stars 19 forks source link

Missing benches and other points in Outdoor #677

Open kudlav opened 1 month ago

kudlav commented 1 month ago

Outdoor style and source contains benches and other pois that are not displayed on map.

When I change 'icon-image': 'bench', to 'icon-image': 'bench_11',, it's displayed on the map but it's not a clickable POI and it's quite blurry like raster image not vector image. https://github.com/zbycz/osmapp/blob/4f9aa66c9de96030b668058b7ac102e8406a1ab5/src/components/Map/styles/outdoorStyle.ts#L2489 image

When searching for Bench category, benches are displayed correctly: image https://osmapp.org/node/11015285006#18.42/49.2206/16.5992

I can't find the code or style for the clickable objects to fix that.

zbycz commented 1 month ago

Hi, good point. I thougt it was showing some time before :)

I think in maplibre-gl all images are always raster (we use this sprite), the blurryness could be caused by scaling the icon. Currently it is set to 0.7 in some in zoom <20. I think we can live with that, but proper solution would be to generate a smaller icon and replace the two icons based on the zoom.

Clickabilty is decided on several factors and the code is quite old and messy. The condition is here and hover state is toggled here.

You can open a PR which will be merged quickly, but in some point in future it will be probably overwritten by upgrading to Outdoor-v2 (https://github.com/zbycz/osmapp/pull/444).