Skip to content Skip to sidebar Skip to footer

Uncaught Typeerror: Object[object Object] Has No Method 'x' At File Y Error

I'm using LeafLet in Android and I'm trying to show edited coordinates in alert. HEAD

Solution 1:

It's a typo. It should be alert(layer.getLatLng().toString());.

Solution 2:

Andy thanks for solution but it is not typo. If you are working with Markers, you have to use getLatLng() function because Marker has only one LatLng. If you are working with more than 1 point like polygon, polyline, you have to use getLatLngs() function. I was working with Marker and i was trying to use getLatLngs() with Marker. That was the problem

Post a Comment for "Uncaught Typeerror: Object[object Object] Has No Method 'x' At File Y Error"