Anybody else see the Geocode USA ad on this page? :-)

If you look at the first art map example, you'll see that I put all the 
addresses in an array and populate the map that way. No form needed.

>Thanks Nathan - I posted the sample code for looking up the address... (
>http://coldfusion.pastebin.com/m3e9365a1)  but it displays the map for the
>"onSubmit" action of the form.
>
>I wont have a form. I'm being clueless as to how to trigger the JS function
>to do the geocode lookup and display my database supplied address.
>
>
>   1. function showAddress(address) {
>   2.       if (geocoder) {
>   3.         geocoder.getLatLng(
>   4.           address,
>   5.           function(point) {
>   6.             if (!point) {
>   7.               alert(address + " not found");
>   8.             } else {
>   9.               map.setCenter(point, 13);
>   10.               var marker = new GMarker(point);
>   11.               map.addOverlay(marker);
>   12.               marker.openInfoWindowHtml(address);
>   13.             }
>   14.           }
>   15.         );
>   16.       }
>
>
>
>   1. <form action="#" onsubmit="showAddress(this.address.value); return
>   false">
>   2.       <p>
>   3.         <input type="text" size="60" name="address" value="1600
>   Amphitheatre Pky, Mountain View, CA" />
>   4.         <input type="submit" value="Go!" />
>   5.       </p>
>   6.       <div id="map_canvas" style="width: 500px; height: 300px"></div>
>   7.     </form> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Adobe® ColdFusion® 8 software 8 is the most important and dramatic release to 
date
Get the Free Trial
http://ad.doubleclick.net/clk;207172674;29440083;f

Archive: 
http://www.houseoffusion.com/groups/cf-community/message.cfm/messageid:290031
Subscription: http://www.houseoffusion.com/groups/cf-community/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.5

Reply via email to