one layer per rectangle to redouce events
This commit is contained in:
parent
1bac02d24f
commit
80d3919b46
3 changed files with 18 additions and 19 deletions
|
|
@ -103,12 +103,9 @@ Ox.MapRectangleMarker = function(options) {
|
|||
@*/
|
||||
that.add = function() {
|
||||
that.marker.addTo(that.map.map);
|
||||
console.log("add marker, fix events")
|
||||
/*
|
||||
google.maps.event.addListener(that.marker, 'dragstart', dragstart);
|
||||
google.maps.event.addListener(that.marker, 'drag', drag);
|
||||
google.maps.event.addListener(that.marker, 'dragend', dragend);
|
||||
*/
|
||||
that.marker.on('dragstart', dragstart);
|
||||
that.marker.on('drag', drag);
|
||||
that.marker.on('dragend', dragend);
|
||||
};
|
||||
|
||||
/*@
|
||||
|
|
@ -124,7 +121,7 @@ Ox.MapRectangleMarker = function(options) {
|
|||
update <f> update
|
||||
@*/
|
||||
that.update = function() {
|
||||
marker = new maplibregl.Marker({
|
||||
var marker = new maplibregl.Marker({
|
||||
cursor: that.position + '-resize',
|
||||
draggable: true,
|
||||
element: Ox.MapMarkerImage({
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue