Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Markers are invisible by default. #4384

Closed
stevage opened this issue Mar 8, 2017 · 2 comments
Closed

Markers are invisible by default. #4384

stevage opened this issue Mar 8, 2017 · 2 comments
Labels

Comments

@stevage
Copy link
Contributor

stevage commented Mar 8, 2017

Prompted by this StackOverflow question. If you simply add a marker to the map, following the example in the API docs:

var marker = new mapboxgl.Marker()
  .setLngLat([30.5, 50.5])
  .addTo(map);

You don't actually get a visible marker. A <div> element is created, with class .mapboxgl-marker, but there is no styling associated with it, so it's completely invisible.

Example: https://codepen.io/stevebennett/pen/RpKVjy

(remove the '-REMOVETHIS' to make the marker visible...)

If this is intended behaviour, it seems really confusing, newbie-unfriendly, and ought to be better documented.

@jfirebaugh
Copy link
Contributor

I agree! We're tracking this in #3557.

@allthesignals
Copy link
Contributor

allthesignals commented Oct 29, 2021

Is this still the case? I can't figure out how this codepen example works: https://codepen.io/allthesignals/pen/NWvvqmV

Running mapbox-gl 2.5.1, I can't get this default appearance to work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants