Skip to content

containerPoint in mouseEvent #413

@mikolajgrajek

Description

@mikolajgrajek

Right now MouseEvent has two fields: latlng and layerPoint:
map.on('click', onMapClick);

    function onMapClick(e) {
        alert("You clicked the map at " + e.layerPoint);
    }

after mouseDrag layerPoint has relative location to old map top-left corner

Is it possible to add additional field with containerPoint location? (to new top-left map corner)
ex.
this.fire(type, {
latlng: this.mouseEventToLatLng(e),
layerPoint: this.mouseEventToLayerPoint(e),
containerPoint: mouseEventToContainerPoint(e)
});

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions