| | 54 | var mapAccCircleOption = { |
| | 55 | fillColor: '#f37171', |
| | 56 | fillOpacity: 0.3, |
| | 57 | strokeColor: '#f37171', |
| | 58 | strokeOpacity: 0.7, |
| | 59 | strokeWeight: 4 |
| | 60 | }; |
| | 61 | |
| | 62 | function toggleGeoTag() { |
| | 63 | if (!geowatch) { |
| | 64 | geowatch = navigator.geolocation.watchPosition(function(g){ |
| | 65 | geo = g; |
| | 66 | var maplink = typeof(display_map) == 'function'; |
| | 67 | $("geotag-info").innerHTML = " : " + (maplink ? '<a href="javascript:display_map([geo.coords.latitude, geo.coords.longitude, geo.coords.accuracy], $(\'geotag-info\'))">' : '') + g.coords.latitude + ", " + g.coords.longitude + " (" + g.coords.accuracy + "m)" + (maplink ? '</a>' : ''); |
| | 68 | setFstHeight(null, true); |
| | 69 | }); |
| | 70 | $("geotag-img").src = "images/earth.png"; |
| | 71 | $("geotag-st").innerHTML = "ON"; |
| | 72 | $("geotag-info").innerHTML = " : -"; |
| | 73 | } else { |
| | 74 | navigator.geolocation.clearWatch(geowatch); |
| | 75 | geo = geowatch = null; |
| | 76 | $("geotag-img").src = "images/earth_off.png"; |
| | 77 | $("geotag-st").innerHTML = "OFF"; |
| | 78 | $("geotag-info").innerHTML = ""; |
| | 79 | setFstHeight(null, true); |
| | 80 | } |
| | 81 | } |
| | 82 | |