This is a static archive of our old OpenStreetMap Help Site. Please post any new questions and answers at community.osm.org.

How to add Text div for every Location

0

Hi,

I would like to add some hover Text for location pins. For Example, if you hover one location pin (I have 3) the address will be shown. For this purpose, I need a div box with some class. Everything else can CSS do.

asked 11 Aug '22, 07:36

Iuliia's gravatar image

Iuliia
11112
accept rate: 0%

1

You'll need to explain a bit more which framework or website you are using.

(11 Aug '22, 09:20) SimonPoole ♦

Here is an example, except here is only one location: https://www.coltundpartner.de/de/kontakt/so_finden_sie_uns/ No framework, only vanilla JS.

(11 Aug '22, 09:25) Iuliia
2

That's using OpenLayers as the mapping library. Which library are you using to display your maps?

In any case, this is probably not related to OpenStreetMap if you are just using OpenStreetMap as a background image layer. For technical questions regarding JavaScript mapping libraries and how to use them, please see https://gis.stackexchange.com/

(11 Aug '22, 11:08) Andy Allan

Source code available on GitHub .