Question

What's the simplest way to have a marker without a pin in mapbox.js, for example a circle marker like the TileMill default one? I have lots of points and the pin is way too heavy.

var marker = L.marker(marker_latlng, {
    icon: L.mapbox.marker.icon({
        'marker-color': '#f22',
        'marker-symbol': 'circle-stroked'
    }),
    title: "Taxi",
    draggable: false
}).addTo(map);

Don't want | Want

enter image description here enter image description here

Basically I would like the circle marker only, without the pin around it.

Possible solutions I thought about:

  • draw a circle per every point
  • use a custom pin image
Was it helpful?

Solution

Have you seen this link? I think it does what you want... when you set the marker symbol to circle its putting a circle icon inside the marker.. you want the whole marker to be a circle so you need to change the marker to circleMarker

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top