Changeset 86
- Timestamp:
- 07/12/07 16:23:00 (1 year ago)
- Files:
-
- branch/webroot/js/jquery.gmapp.js (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
branch/webroot/js/jquery.gmapp.js
r85 r86 78 78 /* FIXME: Search for an address or postcode, return the GLatLng and center map. Then add a dragable marker*/ 79 79 searchAddress : function(address, GGeocoder, infoarea, settings) { 80 console.log(this); 81 var gmapp = this; 80 82 GGeocoder.getLatLng( 81 83 address, 82 function(point ){84 function(point, gmapp){ 83 85 if (!point) { 84 86 alert(address + " not found"); 85 87 } else { 86 return this[0].GMap2.setCenter(point,settings.zoom); 88 console.log(this); 89 gmapp.GMap2.setCenter(point,settings.zoom); 87 90 var marker = new GMarker(point, {draggable: true}); 88 return this[0].GMap2.addOverlay(marker);91 gmapp.GMap2.addOverlay(marker); 89 92 marker.openInfoWindowHtml("Lat: " + point.lat() + " Lng: " + point.lng()); 90 93 GEvent.addListener(marker, "dragend", function(){ … … 103 106 }, 104 107 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)*/ 106 109 /* Example: $("#gmap").addPoint({pointlat:55.958387,pointlnt:-3.162367, pointhtml:"My Point", isdraggable:true});*/ 107 110 addPoint : function(pointlat, pointlng, pointhtml, isdraggable) {