We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hello,
I try to use simple marker (and other kind of mapbox features like LineString) but it's not showing on the map.Here is the code ;
var map = new mapboxgl.OfflineMap({ container: 'map', style: 'styles/osm-bright/style-offline.json', center: [2.15, 41.38], zoom: 8 }); var marker = new mapboxgl.Marker() .setLngLat([2.15, 41.38]) .addTo(map);
But when I switch to online version with same code (OfflineMap-->Map) it works and shows the marker ;
var map = new mapboxgl.Map({ container: 'map', style: 'styles/osm-bright/style-offline.json', center: [2.15, 41.38], zoom: 8 }); var marker = new mapboxgl.Marker() .setLngLat([2.15, 41.38]) .addTo(map);
What could be the reason, any idea?
Thank you
The text was updated successfully, but these errors were encountered:
See README: OfflineMap returns a promise, not a map directly. Try this:
var map = new mapboxgl.Map({ container: 'map', style: 'styles/osm-bright/style-offline.json', center: [2.15, 41.38], zoom: 8 }).then(function(map) { var marker = new mapboxgl.Marker() .setLngLat([2.15, 41.38]) .addTo(map); })
Sorry, something went wrong.
No branches or pull requests
Hello,
I try to use simple marker (and other kind of mapbox features like LineString) but it's not showing on the map.Here is the code ;
But when I switch to online version with same code (OfflineMap-->Map) it works and shows the marker ;
What could be the reason, any idea?
Thank you
The text was updated successfully, but these errors were encountered: