var showmap_gps11 = true; $('#gps11').live('pageshow', function() { $('#map_gps11').gmap({ 'center': new google.maps.LatLng(36.74234016157600,-3.58843454676140), 'zoom': 17,'callback': function(map) { if (showmap_gps11){$('#map_gps11').gmap('addMarker', { position: new google.maps.LatLng(36.74514339324200,-3.58447225349430) }, function(map, marker) {}).click(function () { window.location = '#76'; } ); $('#map_gps11').gmap('addMarker', { position: new google.maps.LatLng(36.74305427803800,-3.58731539505000) }, function(map, marker) {}).click(function () { window.location = '#77'; } ); $('#map_gps11').gmap('addMarker', { position: new google.maps.LatLng(36.74329070339500,-3.58795912521360) }, function(map, marker) {}).click(function () { window.location = '#78'; } ); $('#map_gps11').gmap('addMarker', { position: new google.maps.LatLng(36.74296830500100,-3.58795376079560) }, function(map, marker) {}).click(function () { window.location = '#79'; } ); $('#map_gps11').gmap('addMarker', { position: new google.maps.LatLng(36.74322192518400,-3.58877049344060) }, function(map, marker) {}).click(function () { window.location = '#80'; } ); $('#map_gps11').gmap('addMarker', { position: new google.maps.LatLng(36.74297636498000,-3.58846136885170) }, function(map, marker) {}).click(function () { window.location = '#88'; } ); $('#map_gps11').gmap('addMarker', { position: new google.maps.LatLng(36.74369853542500,-3.58891734438410) }, function(map, marker) {}).click(function () { window.location = '#100'; } ); $('#map_gps11').gmap('addMarker', { position: new google.maps.LatLng(36.74369853542400,-3.58885833578570) }, function(map, marker) {}).click(function () { window.location = '#84'; } ); $('#map_gps11').gmap('addMarker', { position: new google.maps.LatLng(36.74271844531600,-3.59017261820300) }, function(map, marker) {}).click(function () { window.location = '#'; } ); $('#map_gps11').gmap('addMarker', { position: new google.maps.LatLng(36.74245192742000,-3.58936795549860) }, function(map, marker) {}).click(function () { window.location = '#81'; } ); showmap_gps11 = false; setUserPosition(map, 'map_gps11'); }}}); var markerCluster = new MarkerClusterer($('#map_gps11').gmap('getMap'), $('#map_gps11').gmap('getMarkers')); }); function setUserPosition(map, idPage){ if(navigator.geolocation) { watchmap_gps11 = navigator.geolocation.watchPosition ( function(position) { initialLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); $('#map_gps1').gmap('addMarker', { 'title': 'You are here!','position':initialLocation, 'icon': 'images/man.png' }); }); } }var watchmap_gps11; $('#gps11').live('pagehide', function() { if ( navigator.geolocation ) { navigator.geolocation.clearWatch(watchmap_gps11); }}); var showmap_gps13 = true; $('#gps13').live('pageshow', function() { $('#map_gps13').gmap({ 'center': new google.maps.LatLng(36.75051583342200,-3.60354208903780), 'zoom': 15,'callback': function(map) { if (showmap_gps13){$('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74516488590100,-3.58452053325650) }, function(map, marker) {}).click(function () { window.location = '#76'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74305803935600,-3.58747968035220) }, function(map, marker) {}).click(function () { window.location = '#77'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74327189685900,-3.58795174913870) }, function(map, marker) {}).click(function () { window.location = '#78'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74298711161100,-3.58798259454240) }, function(map, marker) {}).click(function () { window.location = '#79'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74323320911400,-3.58885699468120) }, function(map, marker) {}).click(function () { window.location = '#80'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74299893290800,-3.58848148541920) }, function(map, marker) {}).click(function () { window.location = '#88'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74330628595000,-3.58963215308650) }, function(map, marker) {}).click(function () { window.location = '#100'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74370605799600,-3.58891868548860) }, function(map, marker) {}).click(function () { window.location = '#84'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74250673561100,-3.58939343648420) }, function(map, marker) {}).click(function () { window.location = '#81'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74412302232000,-3.58877116399280) }, function(map, marker) {}).click(function () { window.location = '#82'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74386080790800,-3.58980649667250) }, function(map, marker) {}).click(function () { window.location = '#83'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74615515365000,-3.58969116168490) }, function(map, marker) {}).click(function () { window.location = '#89'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74619383992400,-3.58771437364090) }, function(map, marker) {}).click(function () { window.location = '#90'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.73595634226700,-3.59223926024900) }, function(map, marker) {}).click(function () { window.location = '#91'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.73884524748100,-3.58610236602290) }, function(map, marker) {}).click(function () { window.location = '#92'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.73781350810000,-3.58794772582520) }, function(map, marker) {}).click(function () { window.location = '#93'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74032404974400,-3.59000766234860) }, function(map, marker) {}).click(function () { window.location = '#101'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74565437959200,-3.60040390449030) }, function(map, marker) {}).click(function () { window.location = '#95'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74470870292400,-3.60224926429260) }, function(map, marker) {}).click(function () { window.location = '#96'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74396934759400,-3.60506021934020) }, function(map, marker) {}).click(function () { window.location = '#97'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.75447440251200,-3.59793627219660) }, function(map, marker) {}).click(function () { window.location = '#99'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.74690953244500,-3.59102690177430) }, function(map, marker) {}).click(function () { window.location = '#104'; } ); $('#map_gps13').gmap('addMarker', { position: new google.maps.LatLng(36.75457325667200,-3.61397051768770) }, function(map, marker) {}).click(function () { window.location = '#98'; } ); showmap_gps13 = false; setUserPosition(map, 'map_gps13'); }}}); var markerCluster = new MarkerClusterer($('#map_gps13').gmap('getMap'), $('#map_gps13').gmap('getMarkers')); }); function setUserPosition(map, idPage){ if(navigator.geolocation) { watchmap_gps13 = navigator.geolocation.watchPosition ( function(position) { initialLocation = new google.maps.LatLng(position.coords.latitude,position.coords.longitude); $('#map_gps1').gmap('addMarker', { 'title': 'You are here!','position':initialLocation, 'icon': 'images/man.png' }); }); } }var watchmap_gps13; $('#gps13').live('pagehide', function() { if ( navigator.geolocation ) { navigator.geolocation.clearWatch(watchmap_gps13); }});