[openstreetmap/openstreetmap-website] cursor pointer on marker in #openstreetmaps (Issue #3914)

GLucaFrassineti notifications at github.com
Wed Feb 1 16:30:11 UTC 2023


I have this code with openstreetmaps (is a cicle, then I have more marker named marker1, marker2 ,marker3 and so on), but property curosor: pointer dont workk (I tried with a lot of browser of course). 

```
    // Create a marker feature 1    
    var marker1 = new ol.Feature({
        geometry: new ol.geom.Point(ol.proj.fromLonLat([14.3619382, 46.0649361])),
        name: 'some text',
        description: 'other some text'
    });

    // Create a marker style 1  
    var markerStyle1 = new ol.style.Style({
        image: new ol.style.Icon({
        src: '/assets/images/ico.png',
        scale: 1            }),
        cursor: 'pointer'
    });
            
    // Set style to marker feature 1    
    marker1.setStyle(markerStyle1);

    // Add the marker feature 1 to the vector source
    vectorSource.addFeature(marker1);
```
    
    Also tried with css:

```
.ol-marker .ol-icon {
  cursor: pointer;
}
```
the same, dont work :( 
Someone can help me plese? 
Thanks in advanced

-- 
Reply to this email directly or view it on GitHub:
https://github.com/openstreetmap/openstreetmap-website/issues/3914
You are receiving this because you are subscribed to this thread.

Message ID: <openstreetmap/openstreetmap-website/issues/3914 at github.com>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.openstreetmap.org/pipermail/rails-dev/attachments/20230201/8ca53d63/attachment.htm>


More information about the rails-dev mailing list