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
Hi there,
I have a feature request to be able to change an image url in real time in a source.
For example, if I were to add an image source like the following..
map.addSource('radarimg',{ type: 'image', url: 'https://someserver.com/image1.png', coordinates: [ [0, 0], [0, 0], [0, 0], [0, 0] ] }); map.addLayer({ id: 'radarimg', source: 'radarimg', type: 'raster' });
Now, say I have an array of images that I would like to change on the fly using a setTimeout, something like this:
map.getSource('radarimg').setUrl('https://someserver.com/image2.png');
I have tried setting each individual image as its own layer and source, and turning the layers on and off like in the example here: https://www.mapbox.com/mapbox-gl-js/example/animate-images/
However, in large volumes of images, this is highly inefficient.
If I've missed something here, I apologise. I am a bit of a noob.. :)
The text was updated successfully, but these errors were encountered:
Thanks for the suggestion @jordandalley. This was previously requested; closing as duplicate of #4050.
Sorry, something went wrong.
No branches or pull requests
Hi there,
I have a feature request to be able to change an image url in real time in a source.
For example, if I were to add an image source like the following..
map.addSource('radarimg',{
type: 'image',
url: 'https://someserver.com/image1.png',
coordinates: [
[0, 0],
[0, 0],
[0, 0],
[0, 0]
]
});
map.addLayer({
id: 'radarimg',
source: 'radarimg',
type: 'raster'
});
Now, say I have an array of images that I would like to change on the fly using a setTimeout, something like this:
map.getSource('radarimg').setUrl('https://someserver.com/image2.png');
I have tried setting each individual image as its own layer and source, and turning the layers on and off like in the example here: https://www.mapbox.com/mapbox-gl-js/example/animate-images/
However, in large volumes of images, this is highly inefficient.
If I've missed something here, I apologise. I am a bit of a noob.. :)
The text was updated successfully, but these errors were encountered: