Gossamer Forum
Home : Products : Gossamer Links : Development, Plugins and Globals :

Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1

Quote Reply
Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1 In reply to
This 'quick' work around is OK if you want to use 'precise' co-ordinates for the location map on the DETAILED page, as sometimes the ZIP / postcode will only provide a general location marker.

By adding Latitude + Longitude fields to the Links properties table, which can be used for manually adding location co-ordinates. Then editing / adding some extra code to the 'Google Maps' code that goes into the detailed.html page.

This only works for the DETAILED page and will not effect / update the 'category' map, this will still use the location co-ordinates from the address fields.

NOTE: the Plugin "GoogleMap" has a tool to 'refresh' the lat / long' co-ordinates, using the link labelled "Delete a Links long/lat values" - this will then 'grab' the new data during next build.

<%-- START GOOGLE MAP STUFF --%>
<%if LongVal%>
<script type="text/javascript" src="http://maps.google.com/maps?file=api&v=2.x&key=<%API_Key%>"></script>
<style>.gmap {
margin: 0px;
padding: 0px;
}
.middleColumn {
margin: 0px;
padding: 0px;
}</style>
<div style="padding: 10px 10px 10px 10px;">
<div id="ForumMembers_mapdisplay" style="width: 500px; height: 300px" class="gmap display"></div>
</div>
<script type="text/javascript">
//<![CDATA[
if (GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("ForumMembers_mapdisplay"));
var center = new GLatLng(<%if Latitude%><%Latitude%><%else%><%LatVal%><%endif%>,<%if Longitude%><%Longitude%><%else%><%LongVal%><%endif%>);

map.setCenter(center, 15);
map.enableContinuousZoom();
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());

m0 = new GMarker(new GLatLng(<%if Latitude%><%Latitude%><%else%><%LatVal%><%endif%>,<%if Longitude%><%Longitude%><%else%><%LongVal%><%endif%>));
GEvent.addListener(m0, "click", function() {
m0.openInfoWindowHtml("<h2><%Title%></h2>");
});
map.addOverlay(m0);

}
else {
alert("Your browser is not compatible with the mapping tool.");
}
//]]>
</script>
<%endif%>
<%-- END GOOGLE MAP STUFF --%>


As a quick work around, this appears to work
Colin Thompson

Last edited by:

colintho: Oct 28, 2008, 4:31 AM
Subject Author Views Date
Thread; hot thread [NEW PLUGIN] GoogleMapByCat v1 Andy 24398 Aug 26, 2008, 3:11 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
Piers1 23301 Sep 17, 2008, 5:36 AM
Thread; hot thread Re: [Piers1] [NEW PLUGIN] GoogleMapByCat v1
Andy 23351 Sep 17, 2008, 5:58 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
Sies 23267 Oct 16, 2008, 5:55 AM
Thread; hot thread Re: [Sies] [NEW PLUGIN] GoogleMapByCat v1
Andy 23295 Oct 16, 2008, 6:08 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
Sies 23283 Oct 16, 2008, 11:57 AM
Post; hot thread Re: [Sies] [NEW PLUGIN] GoogleMapByCat v1
Andy 23219 Oct 16, 2008, 11:13 PM
Thread; hot thread Re: [Piers1] [NEW PLUGIN] GoogleMapByCat v1
colintho 25836 Nov 4, 2008, 9:20 AM
Thread; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
Piers1 25926 Nov 4, 2008, 9:40 AM
Thread; hot thread Re: [Piers1] [NEW PLUGIN] GoogleMapByCat v1
colintho 25756 Nov 4, 2008, 10:16 AM
Thread; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
Andy 25806 Nov 4, 2008, 11:59 PM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
Jesus 25610 Aug 5, 2009, 8:18 AM
Post; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1
Andy 25544 Aug 5, 2009, 10:00 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1
Andy 25588 Aug 5, 2009, 11:14 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
Jesus 25716 Aug 5, 2009, 11:47 AM
Post; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1
Andy 25502 Aug 6, 2009, 1:24 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1
Andy 25597 Aug 7, 2009, 3:59 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 25517 Aug 7, 2009, 8:07 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 25483 Aug 8, 2009, 4:59 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 25565 Aug 12, 2009, 3:52 PM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 25526 Aug 13, 2009, 12:02 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 25545 Aug 13, 2009, 8:02 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 25457 Aug 13, 2009, 8:46 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 25513 Aug 13, 2009, 9:24 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 25504 Aug 13, 2009, 10:14 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 25380 Aug 13, 2009, 11:31 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 25548 Aug 14, 2009, 1:22 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 17438 Aug 14, 2009, 8:24 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 17394 Aug 14, 2009, 8:39 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 17398 Aug 14, 2009, 8:44 AM
Post; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 17306 Aug 14, 2009, 9:41 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
VishalT 17402 Aug 14, 2009, 9:07 AM
Thread; hot thread Re: [SWDevil.Com] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 17458 Aug 14, 2009, 9:42 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 17489 Aug 14, 2009, 10:30 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 17423 Aug 14, 2009, 10:46 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 17388 Aug 14, 2009, 10:54 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 17351 Aug 17, 2009, 8:08 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 17328 Aug 17, 2009, 8:19 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 17329 Aug 17, 2009, 8:28 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 17281 Aug 17, 2009, 9:00 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 17320 Aug 17, 2009, 9:28 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 17321 Aug 17, 2009, 9:32 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 17282 Aug 17, 2009, 9:46 AM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 17323 Aug 17, 2009, 10:25 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 17440 Aug 17, 2009, 10:41 PM
Thread; hot thread Re: [Jesus] [NEW PLUGIN] GoogleMapByCat v1nk
Andy 16831 Feb 12, 2011, 5:07 AM
Post; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1nk
Jesus 16668 Feb 12, 2011, 8:17 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
colintho 23342 Oct 27, 2008, 1:37 AM
Post; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
Andy 23261 Oct 27, 2008, 1:41 AM
Thread; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
Andy 23237 Oct 27, 2008, 1:54 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
colintho 23220 Oct 27, 2008, 2:06 AM
Thread; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
Andy 23244 Oct 27, 2008, 2:14 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
colintho 23238 Oct 27, 2008, 2:37 AM
Thread; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
Andy 23283 Oct 27, 2008, 2:48 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
colintho 23360 Oct 27, 2008, 3:06 AM
Thread; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
Andy 23213 Oct 27, 2008, 3:07 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
colintho 23234 Oct 27, 2008, 3:37 AM
Thread; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
Andy 23274 Oct 27, 2008, 4:04 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
Andy 23232 Oct 27, 2008, 4:33 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
colintho 23250 Oct 27, 2008, 5:35 AM
Post; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
Andy 23220 Oct 27, 2008, 6:13 AM
Thread; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
Andy 23272 Oct 27, 2008, 6:30 AM
Post; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
colintho 25804 Oct 27, 2008, 8:00 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
colintho 25885 Oct 28, 2008, 3:15 AM
Thread; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
Andy 25866 Oct 28, 2008, 3:22 AM
Post; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
colintho 25797 Oct 28, 2008, 4:09 AM
Post; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
Andy 25809 Nov 4, 2008, 1:13 AM
Thread; hot thread Re: [Andy] [NEW PLUGIN] GoogleMapByCat v1
colintho 23297 Oct 27, 2008, 6:00 AM
Thread; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
colintho 23222 Oct 27, 2008, 6:07 AM
Post; hot thread Re: [colintho] [NEW PLUGIN] GoogleMapByCat v1
Andy 23147 Oct 27, 2008, 6:13 AM