I integrated angular google maps with my application to get the latitude and longitude of a certain place by dragging a marker.I successfully returned an object which encapsulates the latitude and longitude fields but I am not knowing how to access them and assign them to local variables in my application.Any idea ? Here is a picture of my chrome console
Asked
Active
Viewed 389 times
1 Answers
2
Well, you have a .
at the end of lat()
instead of a ;
which is messing up your code. Try this:
this.latitude = $event.latLng.lat();
this.longitude = $event.latLng.lng();

Poul Kruijt
- 69,713
- 12
- 145
- 149
-
hey poul , yes I know of that mistake , my problem is that the data I need is complexly nested, I can't seem to figure out how to reach it – Hasan Kanaan Aug 07 '20 at 10:46
-
@HasanKanaan you should post some code, with what you expect, and with what you tried (not a screenshot) – Poul Kruijt Aug 07 '20 at 11:23