Changeset 38682

Show
Ignore:
Timestamp:
11/19/10 00:17:07 (2 years ago)
Author:
NeoCat
Message:

Move toggleGeoTag to twicli.js / fix marker link issue

Location:
websites/twicli
Files:
2 modified

Legend:

Unmodified
Added
Removed
  • websites/twicli/plugins/geomap.js

    r38681 r38682  
    4141        var marker = new google.maps.Marker({position: latlng, map: map}); 
    4242 
    43         if(mapAccCircleOption.radius = coordinates.pop()) { 
     43        if (coordinates[2]) { 
     44                mapAccCircleOption.radius = coordinates.pop(); 
    4445                var accCircle = new google.maps.Circle(mapAccCircleOption); 
    4546                accCircle.setCenter(latlng); 
     
    6061}; 
    6162 
    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  
    8363document.write('<script type="text/javascript" src="http://maps.google.com/maps/api/js?sensor=false"></script>'); 
  • websites/twicli/twicli.js

    r38668 r38682  
    418418                        geo = g; 
    419419                        var maplink = typeof(display_map) == 'function'; 
    420                         $("geotag-info").innerHTML = " : " + (maplink ? '<a href="javascript:display_map([geo.coords.latitude, geo.coords.longitude], $(\'geotag-info\'))">' : '') + g.coords.latitude + ", " + g.coords.longitude + " (" + g.coords.accuracy + "m)" + (maplink ? '</a>' : ''); 
     420                        $("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>' : ''); 
    421421                        setFstHeight(null, true); 
    422422                });