Maybe like this, http://gmaps-samples.googlecode.com/svn/trunk/localsearch/places.html ?
On Jan 23, 9:36 am, mathiastheok <[email protected]> wrote: > I know I know... > > Google has all the documentation etc.... and the code etc... (all that > is just novice frustration....lol) > > I've been working via the google maps API tutorial, I've got my map > working with encoded polylines and it is all wonderful. > > But I was only able to do it by taking the examples and overlaying my > information into them... I know a bit about HTML, but Java, and > calling in functions, I know nothing about. > > The last thing I want to add to my map is a search box (geocoding > search box) so that one can find out which sky train or subway station > is closest to their destination. > > I dont need any of the fancy things you can do with the output of the > geocoding... > I just would like a search box that puts the marker on the map... > that's it. > > I have tried to paste into my code the geocoding codes, but I just > dont know enough to place it properly...or if I have a bracket out of > place or what. > > This is the code I "think" is what I need: > > var map = new GMap2(document.getElementById("map_canvas")); > var geocoder = new GClientGeocoder(); > > function showAddress(address) { > geocoder.getLatLng( > address, > function(point) { > if (!point) { > alert(address + " not found"); > } else { > map.setCenter(point, 13); > var marker = new GMarker(point); > map.addOverlay(marker); > marker.openInfoWindowHtml(address); > > Here is a link to a page where I have my map loaded (I have not > inserted the code as I dont have a clue where to put it): > > http://www.thailandgentlemenstravelclub.com/googlemaptest.html > > Here is the link to my XML. file where I pull the polyline data etc... > if you need to review it: > > http://www.thailandgentlemenstravelclub.com/googletestmap.xml > > If one of you gurus would be kind enough to tell me or show me or > anything where to put the code for the geocodeing (if I have even got > the right code). > > Thanks so much !! --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Google Maps API" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/Google-Maps-API?hl=en -~----------~----~----~----~------~----~------~--~---
