Demo Site

Monday, June 22, 2009

Google Maps AutoComplete

*original post - http://groups.google.com/group/Google-Maps-API/browse_thread/thread/591f5de2893f5d5c/e0be21f57c4c6204?lnk=gst&q=chrismarx#e0be21f57c4c6204

finally,
no more typing out function and method names. Below is a file you can
include with your IDE (I've only tried with Eclipse Ganymede, there
you can add this to your javascript libraries). If someone wants to
get this going with the rest of the api, please post back the script
to scrape it from the api page-


/**
* Extracted from the Google Map API reference page
* http://code.google.com/apis/maps/documentation/reference.html
*
* like so:
*
var methodString = "";
$("h2").each(function(){
var id = $(this).attr("id");
//add methods and function declaration
if(id && id.indexOf(".") == -1){
methodString += ($(this).html().indexOf("namespace") ===
-1) ? "function " + id + "(){};\n" : "var " + id + " = {};\n";
$("table[summary*='"+id+"'][summary*='Methods']").each(function
(){
var tableSummary = $(this).attr("summary");
$("tr",this).each(function(){
var trId = $(this).attr("id");
if( trId && tableSummary.indexOf("Static") === -1){
methodString += id + ".prototype." + trId.split
(".")[1] + " = function(){};\n";
} else
if( trId && tableSummary.indexOf("Static") !== -1){
//handle static references
methodString += trId + " = function(){};\n";
}
});
});
}
});
//console.log(methodString);
$("#makeATextAreaForTheValueUsingFirebug").val(methodString);
* TODO add in alternate constructors, constants, etc.
*/
function GMap2(opts) {};
GMap2.prototype.enableDragging = function(){};
GMap2.prototype.disableDragging = function(){};
GMap2.prototype.draggingEnabled = function(){};
GMap2.prototype.enableInfoWindow = function(){};
GMap2.prototype.disableInfoWindow = function(){};
GMap2.prototype.infoWindowEnabled = function(){};
GMap2.prototype.enableDoubleClickZoom = function(){};
GMap2.prototype.disableDoubleClickZoom = function(){};
GMap2.prototype.doubleClickZoomEnabled = function(){};
GMap2.prototype.enableContinuousZoom = function(){};
GMap2.prototype.disableContinuousZoom = function(){};
GMap2.prototype.continuousZoomEnabled = function(){};
GMap2.prototype.enableGoogleBar = function(){};
GMap2.prototype.disableGoogleBar = function(){};
GMap2.prototype.enableScrollWheelZoom = function(){};
GMap2.prototype.disableScrollWheelZoom = function(){};
GMap2.prototype.scrollWheelZoomEnabled = function(){};
GMap2.prototype.enablePinchToZoom = function(){};
GMap2.prototype.disablePinchToZoom = function(){};
GMap2.prototype.pinchToZoomEnabled = function(){};
GMap2.prototype.getDefaultUI = function(){};
GMap2.prototype.setUIToDefault = function(){};
GMap2.prototype.setUI = function(){};
GMap2.prototype.addControl = function(){};
GMap2.prototype.removeControl = function(){};
GMap2.prototype.getContainer = function(){};
GMap2.prototype.getMapTypes = function(){};
GMap2.prototype.getCurrentMapType = function(){};
GMap2.prototype.setMapType = function(){};
GMap2.prototype.addMapType = function(){};
GMap2.prototype.removeMapType = function(){};
GMap2.prototype.isLoaded = function(){};
GMap2.prototype.getCenter = function(){};
GMap2.prototype.getBounds = function(){};
GMap2.prototype.getBoundsZoomLevel = function(){};
GMap2.prototype.getSize = function(){};
GMap2.prototype.getZoom = function(){};
GMap2.prototype.getDragObject = function(){};
GMap2.prototype.getEarthInstance = function(){};
GMap2.prototype.setCenter = function(){};
GMap2.prototype.panTo = function(){};
GMap2.prototype.panBy = function(){};
GMap2.prototype.panDirection = function(){};
GMap2.prototype.setZoom = function(){};
GMap2.prototype.zoomIn = function(){};
GMap2.prototype.zoomOut = function(){};
GMap2.prototype.savePosition = function(){};
GMap2.prototype.returnToSavedPosition = function(){};
GMap2.prototype.checkResize = function(){};
GMap2.prototype.addOverlay = function(){};
GMap2.prototype.removeOverlay = function(){};
GMap2.prototype.clearOverlays = function(){};
GMap2.prototype.getPane = function(){};
GMap2.prototype.openInfoWindow = function(){};
GMap2.prototype.openInfoWindowHtml = function(){};
GMap2.prototype.openInfoWindowTabs = function(){};
GMap2.prototype.openInfoWindowTabsHtml = function(){};
GMap2.prototype.showMapBlowup = function(){};
GMap2.prototype.updateInfoWindow = function(){};
GMap2.prototype.updateCurrentTab = function(){};
GMap2.prototype.closeInfoWindow = function(){};
GMap2.prototype.getInfoWindow = function(){};
GMap2.prototype.fromContainerPixelToLatLng = function(){};
GMap2.prototype.fromLatLngToContainerPixel = function(){};
GMap2.prototype.fromLatLngToDivPixel = function(){};
GMap2.prototype.fromDivPixelToLatLng = function(){};
function GBounds(){};
GBounds.prototype.toString = function(){};
GBounds.prototype.equals = function(){};
GBounds.prototype.mid = function(){};
GBounds.prototype.min = function(){};
GBounds.prototype.max = function(){};
GBounds.prototype.containsBounds = function(){};
GBounds.prototype.containsPoint = function(){};
GBounds.prototype.extend = function(){};
function GBrowserIsCompatible(){};
function GDraggableObject(){};
GDraggableObject.setDraggableCursor = function(){};
GDraggableObject.setDraggingCursor = function(){};
GDraggableObject.getDraggingCursor = function(){};
GDraggableObject.getDraggableCursor = function(){};
GDraggableObject.prototype.setDraggableCursor = function(){};
GDraggableObject.prototype.setDraggingCursor = function(){};
GDraggableObject.prototype.moveTo = function(){};
GDraggableObject.prototype.moveBy = function(){};
function GDraggableObjectOptions(){};
function GInfoWindow(){};
GInfoWindow.prototype.selectTab = function(){};
GInfoWindow.prototype.hide = function(){};
GInfoWindow.prototype.show = function(){};
GInfoWindow.prototype.isHidden = function(){};
GInfoWindow.prototype.reset = function(){};
GInfoWindow.prototype.getPoint = function(){};
GInfoWindow.prototype.getPixelOffset = function(){};
GInfoWindow.prototype.getSelectedTab = function(){};
GInfoWindow.prototype.getTabs = function(){};
GInfoWindow.prototype.getContentContainers = function(){};
GInfoWindow.prototype.enableMaximize = function(){};
GInfoWindow.prototype.disableMaximize = function(){};
GInfoWindow.prototype.maximize = function(){};
GInfoWindow.prototype.restore = function(){};
function GInfoWindowOptions(){};
function GInfoWindowTab(){};
function GKeyboardHandler(){};
var GLanguage = {};
GLanguage.getLanguageCode = function(){};
GLanguage.isRtl = function(){};
function GLatLng(){};
GLatLng.prototype.lat = function(){};
GLatLng.prototype.lng = function(){};
GLatLng.prototype.latRadians = function(){};
GLatLng.prototype.lngRadians = function(){};
GLatLng.prototype.equals = function(){};
GLatLng.prototype.distanceFrom = function(){};
GLatLng.prototype.distanceFrom = function(){};
GLatLng.prototype.toUrlValue = function(){};
GLatLng.prototype.toUrlValue = function(){};
GLatLng.fromUrlValue = function(){};
GLatLng.prototype.equals = function(){};
GLatLng.prototype.contains = function(){};
GLatLng.prototype.containsLatLng = function(){};
GLatLng.prototype.intersects = function(){};
GLatLng.prototype.containsBounds = function(){};
GLatLng.prototype.extend = function(){};
GLatLng.prototype.getSouthWest = function(){};
GLatLng.prototype.getNorthEast = function(){};
GLatLng.prototype.toSpan = function(){};
GLatLng.prototype.isFullLat = function(){};
GLatLng.prototype.isFullLng = function(){};
GLatLng.prototype.isEmpty = function(){};
GLatLng.prototype.getCenter = function(){};
function GLatLngBounds(){};
GLatLngBounds.prototype.equals = function(){};
GLatLngBounds.prototype.contains = function(){};
GLatLngBounds.prototype.containsLatLng = function(){};
GLatLngBounds.prototype.intersects = function(){};
GLatLngBounds.prototype.containsBounds = function(){};
GLatLngBounds.prototype.extend = function(){};
GLatLngBounds.prototype.getSouthWest = function(){};
GLatLngBounds.prototype.getNorthEast = function(){};
GLatLngBounds.prototype.toSpan = function(){};
GLatLngBounds.prototype.isFullLat = function(){};
GLatLngBounds.prototype.isFullLng = function(){};
GLatLngBounds.prototype.isEmpty = function(){};
GLatLngBounds.prototype.getCenter = function(){};
var GLog = {};
GLog.write = function(){};
GLog.writeUrl = function(){};
GLog.writeHtml = function(){};
function GMapOptions(){};
function GMapPane(){};
function GPoint(){};
GPoint.prototype.equals = function(){};
GPoint.prototype.toString = function(){};
function GSize(){};
GSize.prototype.equals = function(){};
GSize.prototype.toString = function(){};
function GUnload(){};
function G_API_VERSION(){};
var GEvent = {};
GEvent.addListener = function(){};
GEvent.addDomListener = function(){};
GEvent.removeListener = function(){};
GEvent.clearListeners = function(){};
GEvent.clearInstanceListeners = function(){};
GEvent.clearNode = function(){};
GEvent.trigger = function(){};
GEvent.bind = function(){};
GEvent.bindDom = function(){};
GEvent.callback = function(){};
GEvent.callbackArgs = function(){};
function GEventListener(){};
function GControl(){};
GControl.prototype.printable = function(){};
GControl.prototype.selectable = function(){};
GControl.prototype.initialize = function(){};
GControl.prototype.getDefaultPosition = function(){};
function GControlAnchor(){};
function GControlImpl(){};
function GControlPosition(){};
function GHierarchicalMapTypeControl(){};
GHierarchicalMapTypeControl.prototype.addRelationship = function(){};
GHierarchicalMapTypeControl.prototype.removeRelationship = function()
{};
GHierarchicalMapTypeControl.prototype.clearRelationships = function()
{};
function GMapType(){};
GMapType.prototype.getSpanZoomLevel = function(){};
GMapType.prototype.getBoundsZoomLevel = function(){};
GMapType.prototype.getName = function(){};
GMapType.prototype.getProjection = function(){};
GMapType.prototype.getTileSize = function(){};
GMapType.prototype.getTileLayers = function(){};
GMapType.prototype.getMinimumResolution = function(){};
GMapType.prototype.getMaximumResolution = function(){};
GMapType.prototype.getMaxZoomAtLatLng = function(){};
GMapType.prototype.getTextColor = function(){};
GMapType.prototype.getLinkColor = function(){};
GMapType.prototype.getErrorMessage = function(){};
GMapType.prototype.getCopyrights = function(){};
GMapType.prototype.getUrlArg = function(){};
GMapType.prototype.getAlt = function(){};
function GMapTypeControl(){};
function GMapTypeOptions(){};
function GMapUIOptions(){};
function GMenuMapTypeControl(){};
function GNavLabelControl(){};
function GCopyright(){};
GCopyright.prototype.addCopyright = function(){};
GCopyright.prototype.getCopyrights = function(){};
GCopyright.prototype.getCopyrightNotice = function(){};
function GCopyrightCollection(){};
GCopyrightCollection.prototype.addCopyright = function(){};
GCopyrightCollection.prototype.getCopyrights = function(){};
GCopyrightCollection.prototype.getCopyrightNotice = function(){};
function GGroundOverlay(){};
GGroundOverlay.prototype.hide = function(){};
GGroundOverlay.prototype.isHidden = function(){};
GGroundOverlay.prototype.show = function(){};
GGroundOverlay.prototype.supportsHide = function(){};
function GIcon(){};
function GLayer(){};
GLayer.prototype.hide = function(){};
GLayer.prototype.show = function(){};
GLayer.isHidden = function(){};
function GMarker(){};
GMarker.prototype.openInfoWindow = function(){};
GMarker.prototype.openInfoWindowHtml = function(){};
GMarker.prototype.openInfoWindowTabs = function(){};
GMarker.prototype.openInfoWindowTabsHtml = function(){};
GMarker.prototype.bindInfoWindow = function(){};
GMarker.prototype.bindInfoWindowHtml = function(){};
GMarker.prototype.bindInfoWindowTabs = function(){};
GMarker.prototype.bindInfoWindowTabsHtml = function(){};
GMarker.prototype.closeInfoWindow = function(){};
GMarker.prototype.showMapBlowup = function(){};
GMarker.prototype.getIcon = function(){};
GMarker.prototype.getTitle = function(){};
GMarker.prototype.getPoint = function(){};
GMarker.prototype.getLatLng = function(){};
GMarker.prototype.setPoint = function(){};
GMarker.prototype.setLatLng = function(){};
GMarker.prototype.enableDragging = function(){};
GMarker.prototype.disableDragging = function(){};
GMarker.prototype.draggable = function(){};
GMarker.prototype.draggingEnabled = function(){};
GMarker.prototype.setImage = function(){};
GMarker.prototype.hide = function(){};
GMarker.prototype.show = function(){};
GMarker.prototype.isHidden = function(){};
GMarker.prototype.addMarkers = function(){};
GMarker.prototype.addMarker = function(){};
GMarker.prototype.refresh = function(){};
GMarker.prototype.getMarkerCount = function(){};
function GMarkerManager(){};
GMarkerManager.prototype.addMarkers = function(){};
GMarkerManager.prototype.addMarker = function(){};
GMarkerManager.prototype.refresh = function(){};
GMarkerManager.prototype.getMarkerCount = function(){};
function GMarkerManagerOptions(){};
function GMarkerOptions(){};
function GMercatorProjection(){};
GMercatorProjection.prototype.fromLatLngToPixel = function(){};
GMercatorProjection.prototype.fromPixelToLatLng = function(){};
GMercatorProjection.prototype.tileCheckRange = function(){};
GMercatorProjection.prototype.getWrapWidth = function(){};
function GOverlay(){};
GOverlay.getZIndex = function(){};
GOverlay.prototype.initialize = function(){};
GOverlay.prototype.remove = function(){};
GOverlay.prototype.copy = function(){};
GOverlay.prototype.redraw = function(){};
function GPolyEditingOptions(){};
function GPolyStyleOptions(){};
function GPolygon(){};
GPolygon.prototype.fromEncoded = function(){};
GPolygon.prototype.deleteVertex = function(){};
GPolygon.prototype.disableEditing = function(){};
GPolygon.prototype.enableDrawing = function(){};
GPolygon.prototype.enableEditing = function(){};
GPolygon.prototype.getVertexCount = function(){};
GPolygon.prototype.getVertex = function(){};
GPolygon.prototype.getArea = function(){};
GPolygon.prototype.getBounds = function(){};
GPolygon.prototype.hide = function(){};
GPolygon.prototype.insertVertex = function(){};
GPolygon.prototype.isHidden = function(){};
GPolygon.prototype.show = function(){};
GPolygon.prototype.supportsHide = function(){};
GPolygon.prototype.setFillStyle = function(){};
GPolygon.prototype.setStrokeStyle = function(){};
function GPolygonOptions(){};
function GPolyline(){};
GPolyline.prototype.fromEncoded = function(){};
GPolyline.prototype.deleteVertex = function(){};
GPolyline.prototype.disableEditing = function(){};
GPolyline.prototype.enableDrawing = function(){};
GPolyline.prototype.enableEditing = function(){};
GPolyline.prototype.getVertexCount = function(){};
GPolyline.prototype.getVertex = function(){};
GPolyline.prototype.getLength = function(){};
GPolyline.prototype.getBounds = function(){};
GPolyline.prototype.hide = function(){};
GPolyline.prototype.insertVertex = function(){};
GPolyline.prototype.isHidden = function(){};
GPolyline.prototype.show = function(){};
GPolyline.prototype.supportsHide = function(){};
GPolyline.prototype.setStrokeStyle = function(){};
function GPolylineOptions(){};
function GProjection(){};
GProjection.prototype.fromLatLngToPixel = function(){};
GProjection.prototype.fromPixelToLatLng = function(){};
GProjection.prototype.tileCheckRange = function(){};
GProjection.prototype.getWrapWidth = function(){};
function GScreenOverlay(){};
GScreenOverlay.prototype.hide = function(){};
GScreenOverlay.prototype.isHidden = function(){};
GScreenOverlay.prototype.show = function(){};
GScreenOverlay.prototype.supportsHide = function(){};
function GScreenPoint(){};
function GScreenSize(){};
function GTileLayer(){};
GTileLayer.prototype.minResolution = function(){};
GTileLayer.prototype.maxResolution = function(){};
GTileLayer.prototype.getTileUrl = function(){};
GTileLayer.prototype.isPng = function(){};
GTileLayer.prototype.getOpacity = function(){};
GTileLayer.prototype.getCopyright = function(){};
GTileLayer.prototype.hide = function(){};
GTileLayer.prototype.isHidden = function(){};
GTileLayer.prototype.show = function(){};
GTileLayer.prototype.refresh = function(){};
GTileLayer.prototype.supportsHide = function(){};
GTileLayer.prototype.getTileLayer = function(){};
function GTileLayerOptions(){};
function GTileLayerOverlay(){};
GTileLayerOverlay.prototype.hide = function(){};
GTileLayerOverlay.prototype.isHidden = function(){};
GTileLayerOverlay.prototype.show = function(){};
GTileLayerOverlay.prototype.refresh = function(){};
GTileLayerOverlay.prototype.supportsHide = function(){};
GTileLayerOverlay.prototype.getTileLayer = function(){};
function GTileLayerOverlayOptions(){};
function GAdsManager(){};
GAdsManager.prototype.enable = function(){};
GAdsManager.prototype.disable = function(){};
function GAdsManagerOptions(){};
function GClientGeocoder(){};
GClientGeocoder.prototype.getLatLng = function(){};
GClientGeocoder.prototype.getLocations = function(){};
GClientGeocoder.prototype.getLocations = function(){};
GClientGeocoder.prototype.getCache = function(){};
GClientGeocoder.prototype.setCache = function(){};
GClientGeocoder.prototype.setViewport = function(){};
GClientGeocoder.prototype.getViewport = function(){};
GClientGeocoder.prototype.setBaseCountryCode = function(){};
GClientGeocoder.prototype.getBaseCountryCode = function(){};
GClientGeocoder.prototype.reset = function(){};
function GDirections(){};
GDirections.prototype.load = function(){};
GDirections.prototype.loadFromWaypoints = function(){};
GDirections.prototype.clear = function(){};
GDirections.prototype.getStatus = function(){};
GDirections.prototype.getBounds = function(){};
GDirections.prototype.getNumRoutes = function(){};
GDirections.prototype.getRoute = function(){};
GDirections.prototype.getNumGeocodes = function(){};
GDirections.prototype.getGeocode = function(){};
GDirections.prototype.getCopyrightsHtml = function(){};
GDirections.prototype.getSummaryHtml = function(){};
GDirections.prototype.getDistance = function(){};
GDirections.prototype.getDuration = function(){};
GDirections.prototype.getPolyline = function(){};
GDirections.prototype.getMarker = function(){};
function GDirectionsOptions(){};
function GDownloadUrl(){};
function GFactualGeocodeCache(){};
GFactualGeocodeCache.prototype.isCachable = function(){};
function GGeoAddressAccuracy(){};
function GGeoStatusCode(){};
function GGeoXml(){};
GGeoXml.prototype.getTileLayerOverlay = function(){};
GGeoXml.prototype.getDefaultCenter = function(){};
GGeoXml.prototype.getDefaultSpan = function(){};
GGeoXml.prototype.getDefaultBounds = function(){};
GGeoXml.prototype.gotoDefaultViewport = function(){};
GGeoXml.prototype.hasLoaded = function(){};
GGeoXml.prototype.hide = function(){};
GGeoXml.prototype.isHidden = function(){};
GGeoXml.prototype.loadedCorrectly = function(){};
GGeoXml.prototype.show = function(){};
GGeoXml.prototype.supportsHide = function(){};
function GGeocodeCache(){};
GGeocodeCache.prototype.get = function(){};
GGeocodeCache.prototype.isCachable = function(){};
GGeocodeCache.prototype.put = function(){};
GGeocodeCache.prototype.reset = function(){};
GGeocodeCache.prototype.toCanonical = function(){};
function GGoogleBar(){};
function GGoogleBarAdsOptions(){};
function GGoogleBarLinkTarget(){};
function GGoogleBarListingTypes(){};
function GGoogleBarOptions(){};
function GGoogleBarResultList(){};
function GPov(){};
function GRoute(){};
GRoute.prototype.getNumSteps = function(){};
GRoute.prototype.getStep = function(){};
GRoute.prototype.getStartGeocode = function(){};
GRoute.prototype.getEndGeocode = function(){};
GRoute.prototype.getEndLatLng = function(){};
GRoute.prototype.getSummaryHtml = function(){};
GRoute.prototype.getDistance = function(){};
GRoute.prototype.getDuration = function(){};
function GStep(){};
GStep.prototype.getLatLng = function(){};
GStep.prototype.getPolylineIndex = function(){};
GStep.prototype.getDescriptionHtml = function(){};
GStep.prototype.getDistance = function(){};
GStep.prototype.getDuration = function(){};
function GStreetviewClient(){};
GStreetviewClient.prototype.getNearestPanoramaLatLng = function(){};
GStreetviewClient.prototype.getNearestPanorama = function(){};
GStreetviewClient.prototype.getPanoramaById = function(){};
function GStreetviewData(){};
function GStreetviewLink(){};
function GStreetviewLocation(){};
function GStreetviewOverlay(){};
function GStreetviewPanorama(){};
GStreetviewPanorama.prototype.remove = function(){};
GStreetviewPanorama.prototype.setContainer = function(){};
GStreetviewPanorama.prototype.checkResize = function(){};
GStreetviewPanorama.prototype.hide = function(){};
GStreetviewPanorama.prototype.show = function(){};
GStreetviewPanorama.prototype.isHidden = function(){};
GStreetviewPanorama.prototype.getPOV = function(){};
GStreetviewPanorama.prototype.setPOV = function(){};
GStreetviewPanorama.prototype.panTo = function(){};
GStreetviewPanorama.prototype.setLocationAndPOV = function(){};
GStreetviewPanorama.prototype.followLink = function(){};
function GStreetviewPanoramaOptions(){};
function GTrafficOverlay(){};
GTrafficOverlay.prototype.hide = function(){};
GTrafficOverlay.prototype.show = function(){};
function GTrafficOverlayOptions(){};
function GTravelModes(){};
var GXml = {};
GXml.parse = function(){};
GXml.value = function(){};
GXmlHttp.create = function(){};
var GXmlHttp = {};
GXmlHttp.create = function(){};
function GXslt(){};
GXslt.create = function(){};
GXslt.transformToHtml = function(){}; 

this idea was posted here a while back, but the above code is in the
format I needed for Eclipse:
http://groups.google.com/group/Google-Maps-API/browse_thread/thread/b...

No comments:

Labels

Labels

Labels