Closed
Description
mapbox-gl-js version: 1.6.2
Steps to Trigger Behavior
- Try to bind a popup to a marker using
.setPopup
, before.setLngLat
, which is not necessarily counterintuitive
const popup = new mapboxgl.Popup()
.setDOM('<h1>Hello World!</h1>')
const marker = new mapboxgl.Marker()
.setLngLat([lng, lat])
.setPopup(popup)
.addTo(this.map)
Expected Behavior
An error saying that LngLatLike
argument is missing altogether?
Actual Behavior
"Error: `LngLatLike` argument must be specified as a LngLat instance, an object {lng: <lng>, lat: <lat>}, or an array of [<lng>, <lat>]"
Metadata
Assignees
Labels
No labels