ejuke / leaflet.canvas-markers Goto Github PK
View Code? Open in Web Editor NEWLeaflet plugin for displaying icons on canvas instead of DOM
License: MIT License
Leaflet plugin for displaying icons on canvas instead of DOM
License: MIT License
Please, can you add support for marker shadows?
Just draw to canvas two images instead of one. Shadows are not used for optical illusions only. It can be used as kind of icon overlay, etc.
Thank you.
Hello!
On map zoom I removed a layer from a map, load data points then create and attach new layer again.
private mapZommed() {
const markers = await this.getMarkers();
if (this.markersLayer) {
this.markersLayer.remove();
}
this.markersLayer = (L as any).canvasIconLayer({}).addTo(this.map);
this.markersLayer.addMarkers(markers);
}
After calling to markersLayer.remove();
I'm getting this error:
TypeError: null is not an object (evaluating 'this._map.containerPointToLayerPoint')
When using a circleMarker I get the error:
Layer isn't a marker
The aspect ratio doesn't change based on zoom levels. Can this be configured ?
Hi,
Installed this with npm and using with import 'leaflet-canvas-marker/dist/leaflet.canvas-markers.js';
(because import 'leaflet-canvas-marker'
doesn't do the trick for some reason).
I've added the canvas to the map:
this.mapMarkerLayer = L.canvasIconLayer({}).addTo(this.map);
And getting this error on zoom in and out:
When I try to add markers to it L.marker([location.lat, location.long]).addTo(this.mapMarkerLayer).bindPopup(location.name);
, I get this error:
Is it still possible to use L.marker leaflet calls such as bindPopup ?
When I add marker without icon, it does not use default one (as pure Leaflet does it). It crash in _drawMarker.
Please, add function for remove all markers on the canvas layer.
Thank you!
I create L.canvasIconLayer and place it to the map. But without any marker because I plan to add markers later.
When I try to move or zoom map, it raise error: n._latlngMarkers is undefined in _redraw function. (line 10680)
Multiple instances of canvasIconLayer working fine on the map. Just mouse handlers are working with last one only.
Is it support marker clustering?
I am developing a map with about 800,000 markers.
I am trying to use maker clustering technique.
But, this solution is looking good.
So, it will be better if this solution support marker clustering.
Is there an efficient way to find and update a marker? (either remove it or update its location)
Also, I am getting an error when calling removeLayer(markers)
Thank you,
Would it be possible to adjust the plugin to use text instead of an image ?
For example something like this plugin : Leaflet.LabelTextCollision
I kinda did it via PHP by creating a dynamic icon img for every L.circleMarker i want to show, but its very slow (it happens when you need to query 20000 zip codes).
but it would be nice to have something like:
text: feature.properties.mytextstring
I am using Leaflet.Canvas-Markers in an Angular 6 app working with leaflet 1.3.1 and I get the following error :
ERROR TypeError: leaflet__WEBPACK_IMPORTED_MODULE_5___default.a.canvasIconLayer is not a function
I imported leaflet.canvas-markers.js file in angular.json script field.
The Readme.md installation instructions refer to a dist
folder (link), which was removed in 8a243f2. I imported the file /src/plugin/leaflet.canvas-markers.js instead and I am getting the following error:
After some clicking around, obviously the /src/_full.js
or /src/_standalong.js
files have to get imported, but I could not yet figure out what rbush is or what the difference between the two is.
Updating the Readme.md would greatly improve getting started with Leaflet.Canvas-Markers.
Is it very difficult to add click or mousemove listeners for those icon markers?
I mean there must be some projection between the containerpixel and raycasting into the virtual scene to detect a "hit".
I would love to see such feature in your plugin. I will try to make a pull request, but would like to discuss it with you first.
<script src="https://unpkg.com/[email protected]"></script>
And I get this error
Cannot read property 'search' of undefined
Cannot read property 'dirty' of undefined
Anyone have this issue ?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.