Reputation: 1179
I want to a floor plan layer with give coordinates on mapbox. I am using react-map-gl. (https://github.com/uber/react-map-gl). How can I draw a image overlay of on the map. Can you please quote some example or something.
Upvotes: 1
Views: 3222
Reputation: 126065
You can overlay an image using the image
type of source
. For instance:
"sources": {
"overlay": {
"type": "image",
"url": "https://www.mapbox.com/mapbox-gl-js/assets/radar.gif",
"coordinates": [
[-80.425, 46.437],
[-71.516, 46.437],
[-71.516, 37.936],
[-80.425, 37.936]
]
}
},
...
From the example here.
Upvotes: 2