Anyone who used in ionic?

It works different from browser…on mobile device.

from point A, I drag map and go until point B is at the center of map.
then I mouse up, at that point I get lat and leg of map’s center which is B’s position.

code is as below.


On browser It works perfect. it get lat and lng when Mouse is up (B position)
but the problem is that on mobile device.
it get A point’s lat and lng
I alert mouseup to see mouseup is triggered differently , but It works fine on mobile device.
why is it getting map center position wrong?

dragend + getCenter() works on both browser and device :frowning: weird

            let request = {
                latLng: {lat:map.getCenter().lat(),lng:map.getCenter().lng()}
1 Like