leaflet-vega | Leaflet layer based on Vega visualization grammar | Data Visualization library
kandi X-RAY | leaflet-vega Summary
kandi X-RAY | leaflet-vega Summary
Leaflet layer based on Vega visualization grammar
Support
Quality
Security
License
Reuse
Top functions reviewed by kandi - BETA
Currently covering the most popular Java, JavaScript and Python libraries. See a Sample of leaflet-vega
leaflet-vega Key Features
leaflet-vega Examples and Code Snippets
Community Discussions
Trending Discussions on leaflet-vega
QUESTION
In Leaflet, I can create a plugin that will create an HTML canvas element as a separate layer. That canvas element will move on mouse drag automatically.
Is there a way I can do the same in OpenLayers 4? E.g. create canvas inside OL's container, and add that canvas to the layers list?
Thanks!
...ANSWER
Answered 2018-Mar-08 at 21:15That's definitely possible. The https://openlayers.org/en/latest/examples/d3.html shows how to do it. The component you'll want to use is ol.source.ImageCanvas
. It is configured with a canvasFunction
that creates a canvas for a given extent, resolution and size.
If, however you want a static canvas to pan/zoom with a map, then ol.source.ImageStatic
is the component you'll want to use. See https://openlayers.org/en/latest/examples/static-image.html for an example. You can configure it with an Image or Canvas element of a fixed size, extent and resolution, which will be scaled and moved to fix the map's view.
Community Discussions, Code Snippets contain sources that include Stack Exchange Network
Vulnerabilities
No vulnerabilities reported
Install leaflet-vega
open demo/demo.html file directly in your browser. No server is needed.
Support
Reuse Trending Solutions
Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from over 650 million Knowledge Items
Find more librariesStay Updated
Subscribe to our newsletter for trending solutions and developer bootcamps
Share this Page