var stdGrey = '#272e35'; var mapOptions = { center: new google.maps.LatLng(-33.836311,151.208267), zoom: 12, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.TERRAIN, 'map_style'], position: google.maps.ControlPosition.BOTTOM_CENTER } }; var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); <?php $coordsJson = getJsonContents($baseURL . '/json/routeCoords.json'); //get the route coordinates and create latlng objects in javascript prepRoutes($coordsJson); drawRoutes($coordsJson); drawRouteInfoBubbles($coordsJson); setRoutes($coordsJson); placeMapMarkers($pageId, $DB_SERVER, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE); function prepRoutes($coordsJson) { $coordsJS = ''; foreach ($coordsJson['routes'] as $route) { $count = 0; $coordsJS .= "\r\n"; $coordsJS .= 'var ' . strtolower($route['class']) . 'TripCoords = ['; $coordsJS .= "\r\n"; foreach ($route['coords'] as $coords) {
center: new google.maps.LatLng(-33.836311,151.208267), zoom: 12, mapTypeControlOptions: { mapTypeIds: [google.maps.MapTypeId.TERRAIN, 'map_style'], position: google.maps.ControlPosition.BOTTOM_CENTER } }; var map = new google.maps.Map(document.getElementById("map-canvas"), mapOptions); var bounds = new google.maps.LatLngBounds(); //bounds extended in locations and waypoint set functions <?php $coordsJson = getJsonContents('json/routeCoords.json'); //get the route coordinates and create latlng objects in javascript prepMapRoutes($coordsJson, $routeId); drawMapRoute($coordsJson, $routeId); drawRouteInfoBubbles($coordsJson, $routeId); setMapRoutes($coordsJson, $routeId); prepWaypoints($coordsJson, $routeId); placeRouteMapMarkers($routeId, $DB_SERVER, $DB_USERNAME, $DB_PASSWORD, $DB_DATABASE); function prepMapRoutes($coordsJson, $routeId) { $coordsJS = ''; foreach ($coordsJson['routes'] as $route) { if ($route['id'] == $routeId) { $count = 0; $coordsJS .= "\r\n"; $coordsJS .= 'var ' . strtolower($route['class']) . 'TripCoords = [';