Hi Dennis

The Google map API maybe the answer here is a demo script I did a while back
as an example of integrating a  google map into a page:


<!--
Developer: J.Diaz
Date: 14 July 2007
Script: Dynamic Mapping Utilising GoogleMaps API
--->

<!--- ********************************* SETTINGS
********************************* --->

<cfset settings.Logo ="Graphic.gif">
<cfset settings.Exhibition ="My Adress">
<cfset settings.Address ="Some Address">
<cfset settings.Postcode ="SO11111">
<cfset settings.Tel ="tel: 023 80111 222">
<cfset settings.title="Google Maps Util">

<cfset settings.key="YOU NEED A KEY">

<!--- ********************************* SETTINGS
********************************* --->


<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "
http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd";>
<html xmlns="http://www.w3.org/1999/xhtml";>
  <head>

  <style type="text/css">
  <!--
  body {
   margin-left: 0px;
   margin-top: 0px;
   margin-right: 0px;
   margin-bottom: 0px;
  }
  -->
</style>


    <meta http-equiv="content-type" content="text/html; charset=UTF-8"/>
    <title><cfoutput>#settings.title#</cfoutput></title>
    <script src="
http://maps.google.com/maps?file=api&amp;v=2.x&amp;key=<cfoutput>#settings.key#</cfoutput>"
type="text/javascript"></script>
    <script type="text/javascript">
    //<![CDATA[

    var map = null;
    var geocoder = null;

    function load() {
      if (GBrowserIsCompatible()) {
        map = new GMap2(document.getElementById("map"));
        map.addControl(new GSmallMapControl());
     map.addControl(new GMapTypeControl());
        //map.setCenter(new GLatLng(37.4419, -122.1419), 13);
        geocoder = new GClientGeocoder();
        showAddress("<cfoutput>#url.pc#</cfoutput>");

      }
    }

    function showAddress(address) {
      if (geocoder) {
        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("<cfoutput><img
src=#settings.Logo#><br/><font face=arial
size=1>#settings.Exhibition#<br/>#settings.Address#<br/>#settings.Postcode#<br/>#settings.Tel#</font></cfoutput>");

            }
          }
        );
      }
    }


    //]]>
    </script>
  </head>

  <body onload="load()" onunload="GUnload()">

      <div id="map" style="width: 500px; height: 300px"></div>

  </body>
</html>
Obviously the data is hardcoded and would idelly be called from a db.

To include this script within another page you could maybe utilse a iframe:

<div align="center">
<iframe src ="PATH TO YOUR SCRIPT" width="550px" height="350px" frameborder=
"0">
</iframe>
</div>

You will need to get a google map api key from google maps they are free.

Hope this helps.

Thanks

Jose Diaz



On 9/14/07, Dennis Powers <[EMAIL PROTECTED]> wrote:
>
> Michael,
>
> >> Try this
> >> http://www.blayter.com/john/cf_googlemap/
>
> Thank you I was afraid I would have to "roll my own".
>
>
> Best Regards,
>
> Dennis Powers
> UXB Internet - A website design and Hosting Company
> 690 Wolcott Road
> P.O. Box 6029
> Wolcott, CT  06716
> Tel: (203)879-2844
> http://www.uxbinternet.com/
> http://www.uxb.net/
>
> -----Original Message-----
> From: Michael E. Carluen [mailto:[EMAIL PROTECTED]
> Sent: Thursday, September 13, 2007 7:53 PM
> To: CF-Talk
> Subject: RE: Google Maps Tag - CF5
>
> Try this
>
> http://www.blayter.com/john/cf_googlemap/
>
> It's a custom tag, not a cfc.
>
>
>
>
>
>
>
> > -----Original Message-----
> > From: Dennis Powers [mailto:[EMAIL PROTECTED]
> > Sent: Thursday, September 13, 2007 4:42 PM
> > To: CF-Talk
> > Subject: Google Maps Tag - CF5
> >
> > I apologize for being a Luddite on this list but does anyone know of a
> CF
> > 5.x tag for interfacing Google maps for insertion and display on a local
> > website?  Everything I find is CFMX or later.
> >
> >
> >
> > Best Regards,
> >
> > Dennis Powers
> > UXB Internet - A website design and Hosting Company
> > 690 Wolcott Road
> > P.O. Box 6029
> > Wolcott, CT  06716
> > Tel: (203)879-2844
> > http://www.uxbinternet.com/
> > http://www.uxb.net/
> >
> >
> >
> >
> >
>
>
>
> 

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Download the latest ColdFusion 8 utilities including Report Builder,
plug-ins for Eclipse and Dreamweaver updates.
http;//www.adobe.com/cfusion/entitlement/index.cfm?e=labs%5adobecf8%5Fbeta

Archive: 
http://www.houseoffusion.com/groups/CF-Talk/message.cfm/messageid:288488
Subscription: http://www.houseoffusion.com/groups/CF-Talk/subscribe.cfm
Unsubscribe: 
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=11502.10531.4

Reply via email to