Re: [WebDNA] WebDNA and Google Geo Tagging

This WebDNA talk-list message is from

2012


It keeps the original formatting.
numero = 110054
interpreted = N
texte = --047d7bb03e68a0cfd804d149ddc7 Content-Type: text/plain; charset=UTF-8 Steve, Here goes - it's unedited from the snippet used in my CMS - but it should work as a good starting point for you. Take care - Tom
Location Map
[if ("[url][_sLAT][/url]" = "")][then][text]sLAT=53.41291[/text][/then][else][text]sLAT=[_sLAT][/text][/else][/if] [if ("[url][_sLNG][/url]" = "")][then][text]sLNG=-8.24389[/text][/then][else][text]sLNG=[_sLNG][/text][/else][/if] [if ("[url][_sZOOM][/url]" = "")][then][text]sZOOM=6[/text][/then][else][text]sZOOM=[_sZOOM][/text][/else][/if] [!] [/!]

[!] [!] [!]

--047d7bb03e68a0cfd804d149ddc7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Steve,

Here goes - it's unedi= ted from the snippet used in my CMS - but it should work as a good starting= point for you.

Take care
- Tom



<fieldset>
<legend>Location Map</l= egend>


<= div class=3D"gmail_extra"><div class=3D"clearfix" style=3D&quo= t; width: 100%;">

[if ("[url][_sLAT][/url]" =3D "")][then][text]sLAT=3D53= .41291[/text][/then][else][text]sLAT=3D[_sLAT][/text][/else][/if]
[if ("[url][_sLNG][/url]" =3D ""= )][then][text]sLNG=3D-8.24389[/text][/then][else][text]sLNG=3D[_sLNG][/text= ][/else][/if]
[if ("[url][_sZOOM][/url]" =3D "&= quot;)][then][text]sZOOM=3D6[/text][/then][else][text]sZOOM=3D[_sZOOM][/tex= t][/else][/if]


<label for=3D"_sGEOADDRESS">Address to Geocode= </label>
<input id=3D"_sGEOADDRESS" name=3D"= ;_sGEOADDRESS" size=3D"120" type=3D"text" value=3D= "[hideif [url][_sADDRESS][/url]=3D[url][raw][_sADDRESS][/raw][/url]][!= ]

[/!][listwords words=3D[url][grep search=3D(<br />|%0B)&a= mp;replace=3D|][_sADDRESS][/grep][/url]&delimiters=3D|][hideif [index]= =3D1], [/hideif][word][/listwords][!]

[/!][/hideif]" style=3D"width: 400px;"/>
<button onclick=3D&qu= ot;javascript:showAddress();return false;" style=3D"" />M= ap address &#8594;</button>
[!]<button onclick=3D"= ;javascript:resetAddress();return false;" />Reset</button>
[/!]<button onclick=3D"javascript:clearAddress();return false;&q= uot; />Clear</button><br /><br />

<div id=3D"message" style=3D"border: 1px sol= id #000; padding: 15px; background: #EFEFEF;display: none; margin: 0 0 10px= 0; width: 570px;"></div>
<div id=3D"map1" style=3D"width: 97%; height: 300px; c= lear:both; border:3px solid #ccc;"></div>
<p style=3D"marg= in: 0;"><span id=3D"thelat"></span><span i= d=3D"thelng"></span><span id=3D"thezoom">= ;</span></p>

[!]<labe= l for=3D"frmLat" style=3D"width: 180px; text-align: right; m= argin-right: 3px;">Latitude
[/!]<= ;input type=3D"hidden" name=3D"_sLAT" value=3D"[_s= LAT]" id=3D"frmLat" style=3D"width: 100px;" />&= lt;/label>
[!]<label for=3D"frmLon" style=3D&q= uot;width: 180px; text-align: right; margin-right: 3px;">Longitude<= /div>
[/!]<input type=3D"hidden" nam= e=3D"_sLNG" value=3D"[_sLNG]" id=3D"frmLon" s= tyle=3D"width: 100px;" /></label>
[!]<label for=3D"frmZoom" style=3D&= quot;width: 180px; text-align: right; margin-right: 3px;">Zoom
[/!]<input type=3D"hidden" name=3D= "_sZOOM" value=3D"[_sZOOM]" id=3D"frmZoom" st= yle=3D"width: 100px;" /></label><br />


<= div class=3D"gmail_extra">=C2=A0 =C2=A0 <noscript><b>JavaScript= must be enabled in order for you to use Google Maps.</b>=C2=A0
=
=C2=A0 =C2=A0 =C2=A0 However, it seems JavaScript is either disabled or not= supported by your browser.=C2=A0
=C2=A0 = =C2=A0 =C2=A0 To view Google Maps, enable JavaScript by changing your brows= er options, and then=C2=A0
=C2=A0 =C2=A0 =C2=A0 try again.
=C2=A0 =C2= =A0 </noscript>

=C2=A0 =C2=A0 <script type=3D"text/javascript"= ;>
=C2=A0 =C2=A0 //<![CDATA[
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 if (GBrowserIsCompatible()) {=C2=A0

=C2=A0 =C2=A0 =C2=A0 // =3D= =3D=3D=3D=3D=3D Plot a marker after positive reponse to "did you mean&= quot; =3D=3D=3D=3D=3D=3D
=C2=A0 =C2=A0 =C2=A0 function place(lat,lng) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 var marker =3D n= ew GMarker (new GLatLng(lat, lng), {draggable:true});
=C2=A0 =C2=A0 =C2=A0 =C2=A0 var point =3D new GLatLng(lat,lng);<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 map.setCenter(point,= 15);=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 docu= ment.getElementById("message").innerHTML =3D "";
<= div class=3D"gmail_extra">=C2=A0 =C2=A0 =C2=A0 =C2=A0 document.getElementBy= Id("message").style.display=3D"none";
=C2=A0 =C2=A0 =C2=A0 =C2=A0 map.addOverlay(marke= r);

marker.openInfoWindowHtml= ('<div style=3D"width: 205px; height: 50px; font-size: .9em;&qu= ot;><strong>Check this:</strong><br />If this location= is wrong then drag marker to correct location.</div>');
document.getElementById("frmLat").value =3D lat;
doc= ument.getElementById("frmLon").value =3D lng;
document.getElementById("frmZoom").value =3D map.getZoom();

document.getElementById("= thelat").innerHTML =3D ("Lat: " + marker.getPoint().lat() + = ", ");
document.getElementById("thelng").innerHTML =3D ("Lng: &= quot; + marker.getPoint().lng() + ", ");
document.getElementById= ("thezoom").innerHTML =3D ("Zoom: " + map.getZoom());

marker.enableDragging();
GEvent.addListener(marker,"dragend", function () {
m= ap.closeInfoWindow ();
document.getElementById("frmLat").value =3D marker.getPoint()= .lat();
document.getElementById("frmLon").value =3D mark= er.getPoint().lng();
document.getElementById("frmZoom").value =3D map.getZoom();

document.getElementById("= thelat").innerHTML =3D ("Lat: " + marker.getPoint().lat() + = ", ");
document.getElementById("thelng").innerHTML =3D ("Lng: &= quot; + marker.getPoint().lng() + ", ");
document.getElementById= ("thezoom").innerHTML =3D ("Zoom: " + map.getZoom());
= });

=C2=A0 =C2= =A0 =C2=A0 }


function resetAddress() {
map.clearOverlays();
var point =3D new GLatLng([sLAT],[sLNG]);=
var marker =3D new GMar= ker(point, {draggable:true});
map.addOverlay(marker);
map.setCenter(point,[sZ= OOM]);
document.getElementById("frmLat").value =3D (&quo= t;[_sLAT]");
document.getElementById("frmLon").value =3D ("[_sLNG]&qu= ot;);
document.getElementById("frmZoom").value =3D (&quo= t;[_sZOOM]");
document.getElementById("_sGEOADDRESS").value =3D ("[hid= eif [url][_sADDRESS][/url]=3D[url][raw][_sADDRESS][/raw][/url]][!]

[/!][listwords = words=3D[url][grep search=3D(<br />|%0B)&replace=3D|][_sADDRESS][= /grep][/url]&delimiters=3D|][hideif [index]=3D1], [/hideif][word][/list= words][!]

[/!][/hideif]");

//document.getElementBy= Id("thelat").innerHTML =3D ("Lat: " + marker.getPoint()= .lat() + ", ");
//document.getElementById("thelng&q= uot;).innerHTML =3D ("Lng: " + marker.getPoint().lng() + ", = ");
//<= /span>document.getElementById("thezoom").innerHTML =3D ("Zoo= m: " + map.getZoom());

document.getElementById= ("message").style.display=3D"none";

marker.enableDragging();
GEvent.addListener(marker,"dragend", function () {
m= ap.closeInfoWindow ();
document.getElementById("frmLat").value =3D marker.getPoint()= .lat();
document.getElementById("frmLon").value =3D mark= er.getPoint().lng();
document.getElementById("frmZoom").value =3D map.getZoom();

document.getElementById("= thelat").innerHTML =3D ("Lat: " + marker.getPoint().lat() + = ", ");
document.getElementById("thelng").innerHTML =3D ("Lng: &= quot; + marker.getPoint().lng() + ", ");
document.getElementById= ("thezoom").innerHTML =3D ("Zoom: " + map.getZoom());
= });
}

<= span class=3D"" style=3D"white-space:pre">function clearAddress() {=
map.clearOverlays();
= var point =3D new GLatLng(53.41291,-8.24389);
var marker =3D new GMar= ker(point, {draggable:true});
map.addOverlay(marker);
map.setCenter(point,6);=
document.getElementById("frmLat").value =3D (point.y);<= /div>
document.getElementById= ("frmLon").value =3D (point.x);
<= span class=3D"" style=3D"white-space:pre">document.getElementById(= "frmZoom").value =3D map.getZoom();

document.getElementById("_sGE= OADDRESS").value =3D ("");
<= span class=3D"" style=3D"white-space:pre">document.getElementById(= "frmLat").value =3D ("");
document.getElementById("frmLon").value =3D ("");
= document.getElementById("frmZoom").value =3D (""= ;);

document.getElementById("thel= at").innerHTML =3D ("");
document.getElementById(&q= uot;thelng").innerHTML =3D ("");
document.getElementById("thezoom").innerHTML =3D (""= ;);

document.getElementById("message").style.display=3D"none= ";

marker.enableDragging= ();
GEvent.addListener(marker,"dragend", function () {
m= ap.closeInfoWindow ();
document.getElementById("frmLat").value =3D marker.getPoint()= .lat();
document.getElementById("frmLon").value =3D mark= er.getPoint().lng();
document.getElementById("frmZoom").value =3D map.getZoom();

document.getElementById("= thelat").innerHTML =3D ("Lat: " + marker.getPoint().lat() + = ", ");
document.getElementById("thelng").innerHTML =3D ("Lng: &= quot; + marker.getPoint().lng() + ", ");
document.getElementById= ("thezoom").innerHTML =3D ("Zoom: " + map.getZoom());

});
}

<= br>
=C2=A0 =C2=A0 =C2=A0 var map =3D new GM= ap(document.getElementById("map1"));
=C2=A0 =C2=A0 =C2=A0 map.addControl(new GLargeMa= pControl());
=C2=A0 =C2=A0 =C2=A0 map.addCo= ntrol(new GMapTypeControl());
=C2=A0 =C2=A0= =C2=A0 map.setCenter(new GLatLng([sLAT],[sLNG]),[sZOOM]);=C2=A0
=C2=A0 =C2=A0 =C2=A0 resetAddress();

GEvent.addListener(map, "zoomend&quo= t;,function() {
document.getElementById("frmZoom").value =3D map.getZoom();
<= /span>});=C2=A0


<= div class=3D"gmail_extra">=C2=A0 =C2=A0 =C2=A0 // =3D=3D=3D=3D=3D=3D Create= a Client Geocoder =3D=3D=3D=3D=3D=3D
=C2= =A0 =C2=A0 =C2=A0 var geo =3D new GClientGeocoder();=C2=A0

=C2=A0 =C2=A0 =C2=A0 // =3D=3D=3D=3D= =3D=3D Array for decoding the failure codes =3D=3D=3D=3D=3D=3D
=C2=A0 =C2=A0 =C2=A0 var reasons=3D[];
=C2=A0 =C2=A0 =C2=A0 reasons[G_GEO_SUCCESS] =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D "Success";
=C2=A0 =C2=A0 =C2=A0 reasons[G_GEO_MISSING_ADDRE= SS] =C2=A0 =C2=A0=3D "Missing Address: The address was either missing = or had no value.";
=C2=A0 =C2=A0 =C2= =A0 reasons[G_GEO_UNKNOWN_ADDRESS] =C2=A0 =C2=A0=3D "Unknown Address: = =C2=A0No corresponding geographic location could be found for the specified= address.";
=C2=A0 =C2=A0 =C2=A0 reasons[G_GEO_UNAVAILABLE_A= DDRESS]=3D "Unavailable Address: =C2=A0The geocode for the given addre= ss cannot be returned due to legal or contractual reasons.";
=C2=A0 =C2=A0 =C2=A0 reasons[G_GEO_BAD_KEY] =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0=3D "Bad Key: The API key is either invalid or does not matc= h the domain for which it was given";
= =C2=A0 =C2=A0 =C2=A0 reasons[G_GEO_TOO_MANY_QUERIES] =C2=A0 =3D "Too M= any Queries: The daily geocoding quota for this site has been exceeded.&quo= t;;
=C2=A0 =C2=A0 =C2=A0 reasons[G_GEO_SERVER_ERROR]= =C2=A0 =C2=A0 =C2=A0 =3D "Server error: The geocoding request could n= ot be successfully processed.";
=C2=A0= =C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 =C2=A0 // =3D=3D=3D=3D=3D=3D Geocoding =3D=3D=3D=3D=3D=3D
=C2=A0 =C2=A0 =C2=A0 function showAddress() {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 var search =3D do= cument.getElementById("_sGEOADDRESS").value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 // =3D=3D=3D=3D=3D=3D Perform the G= eocoding =3D=3D=3D=3D=3D=3D =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 geo.getLocations(sea= rch, function (result)
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 {=C2=A0
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 // If that was successful
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (result.Status.code =3D= =3D G_GEO_SUCCESS) {

=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // Clear other markers
map.clearOv= erlays();

// =3D=3D=3D=3D=3D If there was more t= han one result, "ask did you mean" on them all =3D=3D=3D=3D=3D
= if (result.Placemark.length > 1) {=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 document.getElementById("message").innerHTML =3D "Di= d you mean:";
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // Loop through the results
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (var i=3D0; i&l= t;result.Placemark.length; i++) {
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 var p =3D result.Pl= acemark[i].Point.coordinates;
=C2=A0 =C2=A0= =C2=A0 =C2=A0 document.getElementById("message").style.display= =3D"block";
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 document.getElementById("message").innerHTML +=3D = "<br>"+(i+1)+": <a href=3D'javascript:place(&qu= ot; +p[1]+","+p[0]+")'>"+ result.Placemark[i].ad= dress+"<\/a>";
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 // =3D=3D=3D=3D=3D If there was a single marker= =3D=3D=3D=3D=3D
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 document.getElementById("message").innerHTML =3D "&q= uot;;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 var p =3D result.Placemark[0].Point.coordinates;
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 place(p[1],p[0]);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 // =3D=3D=3D=3D=3D=3D Decode the error status =3D=3D= =3D=3D=3D=3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 else {=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 var reason=3D"Code "+result.Status.code;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (reaso= ns[result.Status.code]) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 reason =3D reasons[result.Status.code]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 alert(&#= 39;Could not find "'+search+ '" ' + reason);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 );
=C2=A0 =C2=A0 =C2=A0 }

=
=C2=A0 =C2=A0 }
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 // display a warning if the browser = was not compatible
=C2=A0 =C2=A0 else {
=C2=A0 =C2=A0 =C2=A0 alert("Sorry, the Go= ogle Maps API is not compatible with this browser");
=C2=A0 =C2=A0 }
=
=C2=A0 =C2=A0 // This Javascript is ba= sed on code provided by the
=C2=A0 =C2=A0 /= / Community Church Javascript Team
=C2=A0 =C2=A0 // http://www.bisphamchurch.org.uk/ =C2=A0=C2=A0

=C2=A0 =C2= =A0 //]]>
=C2=A0 =C2=A0 </script><= /div>


</fieldset><br = />
=C2=A0
--047d7bb03e68a0cfd804d149ddc7-- Associated Messages, from the most recent to the oldest:

    
  1. Re: [WebDNA] WebDNA and Google Geo Tagging (Steve Craig 2012)
  2. Re: [WebDNA] WebDNA and Google Geo Tagging (Tom Duke 2012)
  3. Re: [WebDNA] WebDNA and Google Geo Tagging (Steve Craig 2012)
  4. Re: [WebDNA] WebDNA and Google Geo Tagging ("Terry Wilson" 2012)
  5. Re: [WebDNA] WebDNA and Google Geo Tagging (Tom Duke 2012)
  6. Re: [WebDNA] WebDNA and Google Geo Tagging (Steve Craig 2012)
  7. Re: [WebDNA] WebDNA and Google Geo Tagging (Tom Duke 2012)
  8. Re: [WebDNA] WebDNA and Google Geo Tagging (Steve Craig 2012)
  9. Re: [WebDNA] WebDNA and Google Geo Tagging (Tom Duke 2012)
  10. [WebDNA] WebDNA and Google Geo Tagging (Steve Craig 2012)
--047d7bb03e68a0cfd804d149ddc7 Content-Type: text/plain; charset=UTF-8 Steve, Here goes - it's unedited from the snippet used in my CMS - but it should work as a good starting point for you. Take care - Tom
Location Map
[if ("[url][_sLAT][/url]" = "")][then][text]sLAT=53.41291[/text][/then][else][text]sLAT=[_sLAT][/text][/else][/if] [if ("[url][_sLNG][/url]" = "")][then][text]sLNG=-8.24389[/text][/then][else][text]sLNG=[_sLNG][/text][/else][/if] [if ("[url][_sZOOM][/url]" = "")][then][text]sZOOM=6[/text][/then][else][text]sZOOM=[_sZOOM][/text][/else][/if] [url][_sADDRESS][/url]=[url][raw][_sADDRESS][/raw][/url]][!] [/!][listwords words=[url][grep search=(|%0B)&replace=|][_sADDRESS][/grep][/url]&delimiters=|][hideif [index]=1], [/hideif][word][/listwords][!] [/!][/hideif]" style="width: 400px;"/> [!] [/!]

[!] [!] [!]

--047d7bb03e68a0cfd804d149ddc7 Content-Type: text/html; charset=UTF-8 Content-Transfer-Encoding: quoted-printable
Steve,

Here goes - it's unedi= ted from the snippet used in my CMS - but it should work as a good starting= point for you.

Take care
- Tom



<fieldset>
<legend>Location Map</l= egend>


<= div class=3D"gmail_extra"><div class=3D"clearfix" style=3D&quo= t; width: 100%;">

[if ("[url][_sLAT][/url]" =3D "")][then][text]sLAT=3D53= .41291[/text][/then][else][text]sLAT=3D[_sLAT][/text][/else][/if]
[if ("[url][_sLNG][/url]" =3D ""= )][then][text]sLNG=3D-8.24389[/text][/then][else][text]sLNG=3D[_sLNG][/text= ][/else][/if]
[if ("[url][_sZOOM][/url]" =3D "&= quot;)][then][text]sZOOM=3D6[/text][/then][else][text]sZOOM=3D[_sZOOM][/tex= t][/else][/if]


<label for=3D"_sGEOADDRESS">Address to Geocode= </label>
<input id=3D"_sGEOADDRESS" name=3D"= ;_sGEOADDRESS" size=3D"120" type=3D"text" value=3D= "[hideif [url][_sADDRESS][/url]=3D[url][raw][_sADDRESS][/raw][/url]][!= ]

[/!][listwords words=3D[url][grep search=3D(<br />|%0B)&a= mp;replace=3D|][_sADDRESS][/grep][/url]&delimiters=3D|][hideif [index]= =3D1], [/hideif][word][/listwords][!]

[/!][/hideif]" style=3D"width: 400px;"/>
<button onclick=3D&qu= ot;javascript:showAddress();return false;" style=3D"" />M= ap address &#8594;</button>
[!]<button onclick=3D"= ;javascript:resetAddress();return false;" />Reset</button>
[/!]<button onclick=3D"javascript:clearAddress();return false;&q= uot; />Clear</button><br /><br />

<div id=3D"message" style=3D"border: 1px sol= id #000; padding: 15px; background: #EFEFEF;display: none; margin: 0 0 10px= 0; width: 570px;"></div>
<div id=3D"map1" style=3D"width: 97%; height: 300px; c= lear:both; border:3px solid #ccc;"></div>
<p style=3D"marg= in: 0;"><span id=3D"thelat"></span><span i= d=3D"thelng"></span><span id=3D"thezoom">= ;</span></p>

[!]<labe= l for=3D"frmLat" style=3D"width: 180px; text-align: right; m= argin-right: 3px;">Latitude
[/!]<= ;input type=3D"hidden" name=3D"_sLAT" value=3D"[_s= LAT]" id=3D"frmLat" style=3D"width: 100px;" />&= lt;/label>
[!]<label for=3D"frmLon" style=3D&q= uot;width: 180px; text-align: right; margin-right: 3px;">Longitude<= /div>
[/!]<input type=3D"hidden" nam= e=3D"_sLNG" value=3D"[_sLNG]" id=3D"frmLon" s= tyle=3D"width: 100px;" /></label>
[!]<label for=3D"frmZoom" style=3D&= quot;width: 180px; text-align: right; margin-right: 3px;">Zoom
[/!]<input type=3D"hidden" name=3D= "_sZOOM" value=3D"[_sZOOM]" id=3D"frmZoom" st= yle=3D"width: 100px;" /></label><br />


<= div class=3D"gmail_extra">=C2=A0 =C2=A0 <noscript><b>JavaScript= must be enabled in order for you to use Google Maps.</b>=C2=A0
=
=C2=A0 =C2=A0 =C2=A0 However, it seems JavaScript is either disabled or not= supported by your browser.=C2=A0
=C2=A0 = =C2=A0 =C2=A0 To view Google Maps, enable JavaScript by changing your brows= er options, and then=C2=A0
=C2=A0 =C2=A0 =C2=A0 try again.
=C2=A0 =C2= =A0 </noscript>

=C2=A0 =C2=A0 <script type=3D"text/javascript"= ;>
=C2=A0 =C2=A0 //<![CDATA[
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 if (GBrowserIsCompatible()) {=C2=A0

=C2=A0 =C2=A0 =C2=A0 // =3D= =3D=3D=3D=3D=3D Plot a marker after positive reponse to "did you mean&= quot; =3D=3D=3D=3D=3D=3D
=C2=A0 =C2=A0 =C2=A0 function place(lat,lng) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 var marker =3D n= ew GMarker (new GLatLng(lat, lng), {draggable:true});
=C2=A0 =C2=A0 =C2=A0 =C2=A0 var point =3D new GLatLng(lat,lng);<= /div>
=C2=A0 =C2=A0 =C2=A0 =C2=A0 map.setCenter(point,= 15);=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 docu= ment.getElementById("message").innerHTML =3D "";
<= div class=3D"gmail_extra">=C2=A0 =C2=A0 =C2=A0 =C2=A0 document.getElementBy= Id("message").style.display=3D"none";
=C2=A0 =C2=A0 =C2=A0 =C2=A0 map.addOverlay(marke= r);

marker.openInfoWindowHtml= ('<div style=3D"width: 205px; height: 50px; font-size: .9em;&qu= ot;><strong>Check this:</strong><br />If this location= is wrong then drag marker to correct location.</div>');
document.getElementById("frmLat").value =3D lat;
doc= ument.getElementById("frmLon").value =3D lng;
document.getElementById("frmZoom").value =3D map.getZoom();

document.getElementById("= thelat").innerHTML =3D ("Lat: " + marker.getPoint().lat() + = ", ");
document.getElementById("thelng").innerHTML =3D ("Lng: &= quot; + marker.getPoint().lng() + ", ");
document.getElementById= ("thezoom").innerHTML =3D ("Zoom: " + map.getZoom());

marker.enableDragging();
GEvent.addListener(marker,"dragend", function () {
m= ap.closeInfoWindow ();
document.getElementById("frmLat").value =3D marker.getPoint()= .lat();
document.getElementById("frmLon").value =3D mark= er.getPoint().lng();
document.getElementById("frmZoom").value =3D map.getZoom();

document.getElementById("= thelat").innerHTML =3D ("Lat: " + marker.getPoint().lat() + = ", ");
document.getElementById("thelng").innerHTML =3D ("Lng: &= quot; + marker.getPoint().lng() + ", ");
document.getElementById= ("thezoom").innerHTML =3D ("Zoom: " + map.getZoom());
= });

=C2=A0 =C2= =A0 =C2=A0 }


function resetAddress() {
map.clearOverlays();
var point =3D new GLatLng([sLAT],[sLNG]);=
var marker =3D new GMar= ker(point, {draggable:true});
map.addOverlay(marker);
map.setCenter(point,[sZ= OOM]);
document.getElementById("frmLat").value =3D (&quo= t;[_sLAT]");
document.getElementById("frmLon").value =3D ("[_sLNG]&qu= ot;);
document.getElementById("frmZoom").value =3D (&quo= t;[_sZOOM]");
document.getElementById("_sGEOADDRESS").value =3D ("[hid= eif [url][_sADDRESS][/url]=3D[url][raw][_sADDRESS][/raw][/url]][!]

[/!][listwords = words=3D[url][grep search=3D(<br />|%0B)&replace=3D|][_sADDRESS][= /grep][/url]&delimiters=3D|][hideif [index]=3D1], [/hideif][word][/list= words][!]

[/!][/hideif]");

//document.getElementBy= Id("thelat").innerHTML =3D ("Lat: " + marker.getPoint()= .lat() + ", ");
//document.getElementById("thelng&q= uot;).innerHTML =3D ("Lng: " + marker.getPoint().lng() + ", = ");
//<= /span>document.getElementById("thezoom").innerHTML =3D ("Zoo= m: " + map.getZoom());

document.getElementById= ("message").style.display=3D"none";

marker.enableDragging();
GEvent.addListener(marker,"dragend", function () {
m= ap.closeInfoWindow ();
document.getElementById("frmLat").value =3D marker.getPoint()= .lat();
document.getElementById("frmLon").value =3D mark= er.getPoint().lng();
document.getElementById("frmZoom").value =3D map.getZoom();

document.getElementById("= thelat").innerHTML =3D ("Lat: " + marker.getPoint().lat() + = ", ");
document.getElementById("thelng").innerHTML =3D ("Lng: &= quot; + marker.getPoint().lng() + ", ");
document.getElementById= ("thezoom").innerHTML =3D ("Zoom: " + map.getZoom());
= });
}

<= span class=3D"" style=3D"white-space:pre">function clearAddress() {=
map.clearOverlays();
= var point =3D new GLatLng(53.41291,-8.24389);
var marker =3D new GMar= ker(point, {draggable:true});
map.addOverlay(marker);
map.setCenter(point,6);=
document.getElementById("frmLat").value =3D (point.y);<= /div>
document.getElementById= ("frmLon").value =3D (point.x);
<= span class=3D"" style=3D"white-space:pre">document.getElementById(= "frmZoom").value =3D map.getZoom();

document.getElementById("_sGE= OADDRESS").value =3D ("");
<= span class=3D"" style=3D"white-space:pre">document.getElementById(= "frmLat").value =3D ("");
document.getElementById("frmLon").value =3D ("");
= document.getElementById("frmZoom").value =3D (""= ;);

document.getElementById("thel= at").innerHTML =3D ("");
document.getElementById(&q= uot;thelng").innerHTML =3D ("");
document.getElementById("thezoom").innerHTML =3D (""= ;);

document.getElementById("message").style.display=3D"none= ";

marker.enableDragging= ();
GEvent.addListener(marker,"dragend", function () {
m= ap.closeInfoWindow ();
document.getElementById("frmLat").value =3D marker.getPoint()= .lat();
document.getElementById("frmLon").value =3D mark= er.getPoint().lng();
document.getElementById("frmZoom").value =3D map.getZoom();

document.getElementById("= thelat").innerHTML =3D ("Lat: " + marker.getPoint().lat() + = ", ");
document.getElementById("thelng").innerHTML =3D ("Lng: &= quot; + marker.getPoint().lng() + ", ");
document.getElementById= ("thezoom").innerHTML =3D ("Zoom: " + map.getZoom());

});
}

<= br>
=C2=A0 =C2=A0 =C2=A0 var map =3D new GM= ap(document.getElementById("map1"));
=C2=A0 =C2=A0 =C2=A0 map.addControl(new GLargeMa= pControl());
=C2=A0 =C2=A0 =C2=A0 map.addCo= ntrol(new GMapTypeControl());
=C2=A0 =C2=A0= =C2=A0 map.setCenter(new GLatLng([sLAT],[sLNG]),[sZOOM]);=C2=A0
=C2=A0 =C2=A0 =C2=A0 resetAddress();

GEvent.addListener(map, "zoomend&quo= t;,function() {
document.getElementById("frmZoom").value =3D map.getZoom();
<= /span>});=C2=A0


<= div class=3D"gmail_extra">=C2=A0 =C2=A0 =C2=A0 // =3D=3D=3D=3D=3D=3D Create= a Client Geocoder =3D=3D=3D=3D=3D=3D
=C2= =A0 =C2=A0 =C2=A0 var geo =3D new GClientGeocoder();=C2=A0

=C2=A0 =C2=A0 =C2=A0 // =3D=3D=3D=3D= =3D=3D Array for decoding the failure codes =3D=3D=3D=3D=3D=3D
=C2=A0 =C2=A0 =C2=A0 var reasons=3D[];
=C2=A0 =C2=A0 =C2=A0 reasons[G_GEO_SUCCESS] =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D "Success";
=C2=A0 =C2=A0 =C2=A0 reasons[G_GEO_MISSING_ADDRE= SS] =C2=A0 =C2=A0=3D "Missing Address: The address was either missing = or had no value.";
=C2=A0 =C2=A0 =C2= =A0 reasons[G_GEO_UNKNOWN_ADDRESS] =C2=A0 =C2=A0=3D "Unknown Address: = =C2=A0No corresponding geographic location could be found for the specified= address.";
=C2=A0 =C2=A0 =C2=A0 reasons[G_GEO_UNAVAILABLE_A= DDRESS]=3D "Unavailable Address: =C2=A0The geocode for the given addre= ss cannot be returned due to legal or contractual reasons.";
=C2=A0 =C2=A0 =C2=A0 reasons[G_GEO_BAD_KEY] =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0=3D "Bad Key: The API key is either invalid or does not matc= h the domain for which it was given";
= =C2=A0 =C2=A0 =C2=A0 reasons[G_GEO_TOO_MANY_QUERIES] =C2=A0 =3D "Too M= any Queries: The daily geocoding quota for this site has been exceeded.&quo= t;;
=C2=A0 =C2=A0 =C2=A0 reasons[G_GEO_SERVER_ERROR]= =C2=A0 =C2=A0 =C2=A0 =3D "Server error: The geocoding request could n= ot be successfully processed.";
=C2=A0= =C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 =C2=A0 // =3D=3D=3D=3D=3D=3D Geocoding =3D=3D=3D=3D=3D=3D
=C2=A0 =C2=A0 =C2=A0 function showAddress() {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 var search =3D do= cument.getElementById("_sGEOADDRESS").value;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 // =3D=3D=3D=3D=3D=3D Perform the G= eocoding =3D=3D=3D=3D=3D=3D =C2=A0 =C2=A0 =C2=A0 =C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 geo.getLocations(sea= rch, function (result)
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 {=C2=A0
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 // If that was successful
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (result.Status.code =3D= =3D G_GEO_SUCCESS) {

=C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // Clear other markers
map.clearOv= erlays();

// =3D=3D=3D=3D=3D If there was more t= han one result, "ask did you mean" on them all =3D=3D=3D=3D=3D
= if (result.Placemark.length > 1) {=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 document.getElementById("message").innerHTML =3D "Di= d you mean:";
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 // Loop through the results
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 for (var i=3D0; i&l= t;result.Placemark.length; i++) {
=C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 var p =3D result.Pl= acemark[i].Point.coordinates;
=C2=A0 =C2=A0= =C2=A0 =C2=A0 document.getElementById("message").style.display= =3D"block";
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 document.getElementById("message").innerHTML +=3D = "<br>"+(i+1)+": <a href=3D'javascript:place(&qu= ot; +p[1]+","+p[0]+")'>"+ result.Placemark[i].ad= dress+"<\/a>";
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 // =3D=3D=3D=3D=3D If there was a single marker= =3D=3D=3D=3D=3D
=C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0 =C2=A0 else {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 document.getElementById("message").innerHTML =3D "&q= uot;;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 var p =3D result.Placemark[0].Point.coordinates;
=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 place(p[1],p[0]);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 // =3D=3D=3D=3D=3D=3D Decode the error status =3D=3D= =3D=3D=3D=3D
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 else {=
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 var reason=3D"Code "+result.Status.code;
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 if (reaso= ns[result.Status.code]) {
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0= =C2=A0 reason =3D reasons[result.Status.code]
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }=C2=A0
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 alert(&#= 39;Could not find "'+search+ '" ' + reason);
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 }
=C2=A0 =C2=A0 =C2=A0 =C2=A0 );
=C2=A0 =C2=A0 =C2=A0 }

=
=C2=A0 =C2=A0 }
=C2=A0 =C2=A0=C2=A0
=C2=A0 =C2=A0 // display a warning if the browser = was not compatible
=C2=A0 =C2=A0 else {
=C2=A0 =C2=A0 =C2=A0 alert("Sorry, the Go= ogle Maps API is not compatible with this browser");
=C2=A0 =C2=A0 }
=
=C2=A0 =C2=A0 // This Javascript is ba= sed on code provided by the
=C2=A0 =C2=A0 /= / Community Church Javascript Team
=C2=A0 =C2=A0 // http://www.bisphamchurch.org.uk/ =C2=A0=C2=A0

=C2=A0 =C2= =A0 //]]>