Assembla home | Assembla project page
 

Changeset 86

Show
Ignore:
Timestamp:
07/12/07 16:23:00 (1 year ago)
Author:
digitalspaghetti
Message:

Backing up before changes to structure

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • branch/webroot/js/jquery.gmapp.js

    r85 r86  
    7878        /* FIXME: Search for an address or postcode, return the GLatLng and center map.  Then add a dragable marker*/ 
    7979        searchAddress : function(address, GGeocoder, infoarea, settings) { 
     80                console.log(this); 
     81                var gmapp = this; 
    8082                GGeocoder.getLatLng( 
    8183                address, 
    82                 function(point){ 
     84                function(point, gmapp){ 
    8385                        if (!point) { 
    8486                                alert(address + " not found"); 
    8587                        } else { 
    86                                 return this[0].GMap2.setCenter(point,settings.zoom); 
     88                                console.log(this); 
     89                                gmapp.GMap2.setCenter(point,settings.zoom); 
    8790                                var marker = new GMarker(point, {draggable: true}); 
    88                                 return this[0].GMap2.addOverlay(marker); 
     91                                gmapp.GMap2.addOverlay(marker); 
    8992                                marker.openInfoWindowHtml("Lat: " + point.lat() + " Lng: " + point.lng()); 
    9093                                GEvent.addListener(marker, "dragend", function(){ 
     
    103106        }, 
    104107         
    105         /* FIXME: Add's a point to the current map (this function currently does not give the desired results)*/ 
     108        /* Add's a point to the current map (this function currently does not give the desired results)*/ 
    106109        /* Example: $("#gmap").addPoint({pointlat:55.958387,pointlnt:-3.162367, pointhtml:"My Point", isdraggable:true});*/ 
    107110        addPoint : function(pointlat, pointlng, pointhtml, isdraggable) {