()
| 32 | }; |
| 33 | |
| 34 | function initialize() { |
| 35 | |
| 36 | var defaultLatLng = new google.maps.LatLng(0.1, 0.1); // Add the coordinates |
| 37 | |
| 38 | markerImage = { |
| 39 | url: 'images/blue_marker.png', |
| 40 | scaledSize: new google.maps.Size(30, 30) |
| 41 | }; |
| 42 | |
| 43 | disabledMarkerImage = { |
| 44 | url: 'images/grey_marker.png', |
| 45 | scaledSize: new google.maps.Size(30, 30) |
| 46 | }; |
| 47 | |
| 48 | var mapOptions = { |
| 49 | center: defaultLatLng, |
| 50 | zoom: defaultZoom, // The initial zoom level when your map loads (0-20) |
| 51 | minZoom: minZoom, // Minimum zoom level allowed (0-20) |
| 52 | maxZoom: 18, // Maximum soom level allowed (0-20) |
| 53 | zoomControl: false, // Set to true if using zoomControlOptions below, or false to remove all zoom controls. |
| 54 | mapTypeId: google.maps.MapTypeId.ROADMAP, // Set the type of Map |
| 55 | scrollwheel: true, // Enable Mouse Scroll zooming |
| 56 | // All of the below are set to true by default, so simply remove if set to true: |
| 57 | panControl: false, // Set to false to disable |
| 58 | mapTypeControl: false, // Disable Map/Satellite switch |
| 59 | scaleControl: false, // Set to false to hide scale |
| 60 | streetViewControl: false, // Set to disable to hide street view |
| 61 | overviewMapControl: false, // Set to false to remove overview control |
| 62 | rotateControl: false // Set to false to disable rotate control |
| 63 | }; |
| 64 | var mapDiv = document.getElementById('map-canvas'); |
| 65 | map = new google.maps.Map(mapDiv, mapOptions); |
| 66 | |
| 67 | initialiseEventBus(); |
| 68 | |
| 69 | //navigator.geolocation.getCurrentPosition(onFirstPosition, onPositionError, locationOptions); |
| 70 | |
| 71 | onFirstPosition({ |
| 72 | "coords": { |
| 73 | latitude: parseFloat(0.1), |
| 74 | longitude: parseFloat(0.1) |
| 75 | } |
| 76 | }); |
| 77 | } |
| 78 | |
| 79 | function onFirstPosition(position) { |
| 80 | setUserLocation(position.coords.latitude, position.coords.longitude); |
nothing calls this directly
no test coverage detected