4 examples of 'google maps latlng example' in JavaScript

Every line of 'google maps latlng example' code snippets is scanned for vulnerabilities by our powerful machine learning engine that combs millions of open source libraries, ensuring your JavaScript code is secure.

All examples are scanned by Snyk Code

By copying the Snyk Code Snippets you agree to
this disclaimer
1033constructor(public lat: number, public lng: number) {
1034 this._objectInstance = new plugin.google.maps.LatLng(lat, lng);
1035}
Important

Use secure code every time

Secure your code as it's written. Use Snyk Code to scan source code in minutes – no build needed – and fix issues immediately. Enable Snyk Code

28function getRandomLatLng(llbounds) {
29 var s = llbounds.getSouth(),
30 n = llbounds.getNorth(),
31 w = llbounds.getWest(),
32 e = llbounds.getEast();
33
34 return L.latLng(
35 s + (Math.random() * (n - s)),
36 w + (Math.random() * (e - w))
37 )
38}
59addMarker(LatLngArr){
60 for (var i = 0; i < this.markers.length; i++) {
61 this.markers[i].setMap(null);
62 }
63 this.markers = [];
64 for (var i = 0; i < LatLngArr.length; i++) {
65 var coords = LatLngArr[i];
66 var latLng = new google.maps.LatLng(coords.lat,coords.lng);
67 var marker = new google.maps.Marker({
68 position: latLng,
69 map: this.map
70 });
71 google.maps.event.addListener(marker,'click',(event)=>{
72 let clickMenu = this.modalCtrl.create(MapClickMenuPage,{latlng : event.latLng});
73 clickMenu.present();
74 });
75 this.markers[i] = marker;
76 }
77 }
96export function latLng(options) {
97 return new LatLng(options);
98}

Related snippets