Commit dac3d6cc5583dfe9d47e2f26d510b20230fcc6f2
1 parent
f602ed01
-Map ready
Showing
1 changed file
with
16 additions
and
5 deletions
Show diff stats
frontend/web/js/gmaps.init.js
| ... | ... | @@ -2,16 +2,27 @@ $( |
| 2 | 2 | function() { |
| 3 | 3 | |
| 4 | 4 | function initMap() { |
| 5 | + var myLatLng = { | |
| 6 | + lat: parseFloat(window.lat), | |
| 7 | + lng: parseFloat(window.lon) | |
| 8 | + }; | |
| 9 | + | |
| 5 | 10 | var map = new google.maps.Map( |
| 6 | 11 | document.getElementById('map'), { |
| 7 | - center: { | |
| 8 | - lat: parseFloat(window.lat), | |
| 9 | - lng: parseFloat(window.lon) | |
| 10 | - }, | |
| 12 | + center: myLatLng, | |
| 11 | 13 | scrollwheel: false, |
| 12 | - zoom: 16 | |
| 14 | + zoom: 14 | |
| 13 | 15 | } |
| 14 | 16 | ); |
| 17 | + | |
| 18 | + var marker = new google.maps.Marker( | |
| 19 | + { | |
| 20 | + position: myLatLng, | |
| 21 | + map: map, | |
| 22 | + title: 'Hello World!' | |
| 23 | + } | |
| 24 | + ); | |
| 25 | + | |
| 15 | 26 | } |
| 16 | 27 | |
| 17 | 28 | window.initMap = initMap(); | ... | ... |