Support for adding custom image at runtime using map.addImage
See original GitHub issueMapbox-gl allow to add custom images at runtime using loadImage
and addImage
, I don’t think loadImage
is necessary, instead user should pass an HTMLImageElement
to addImage
and query for the image by their own using new window.Image()
.
In term of API I am not sure what is best between using prop of Layer component:
<Layer
addImage={image}
>
</Layer>
Or having a component for that:
<ImageSource image={image}/>
Issue Analytics
- State:
- Created 6 years ago
- Comments:15 (3 by maintainers)
Top Results From Across the Web
Add a generated icon to the map | Mapbox GL JS
This example uses addImage to generate an icon at runtime and add it to a map style. Then it adds the icon to...
Read more >How to add Images inside a custom container on Mapbox?
You can load an image and then use it as part of a symbol layer. You can see it in one of the...
Read more >Add Image—ArcGIS REST APIs
The AddImage operation allows you to add new images to an existing image collection. License: As of 10.5, you must license your ArcGIS...
Read more >Adding images to your Xcode project
Import images into your project, manage their appearances and variations, and load them at runtime.
Read more >Configure Service Accounts for Pods
A service account provides an identity for processes that run in a Pod, and maps to a ServiceAccount object. ... Add image pull...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
For reference, the prop
images
has been added to react-mapbox-gl with the release2.5.0
, it can be use this way:This works for me (shows the image) but gives me a few errors when removing the <Layer> the new image is associated with:
Errors when
!show
:and