Hi,
Try linking this in link.html;
..then, make a new template called "google_map.html". Put the following code in it:
<html>
<head>
<title>Map for <%Title%></title>
<body>
<%Plugins::GoogleMap::LoadMap($ID)%>
<%-- 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 align="center" 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(<%LatVal%>,<%LongVal%>);
map.setCenter(center, 15);
map.enableContinuousZoom();
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
m0 = new GMarker(new GLatLng(<%LatVal%>,<%LongVal%>));
GEvent.addListener(m0, "click", function() {
m0.openInfoWindowHtml("<h2>fff</h2>");
});
map.addOverlay(m0);
}
else {
alert("Your browser is not compatible with the mapping tool.");
}
//]]>
</script>
<%endif%>
<%-- END GOOGLE MAP STUFF --%>
</body>
</html>
Now, you need to make a new global - called "load_link_details", with the following code:
my $link = $DB->table('Links')->select( { ID => $_[0] } )->fetchrow_hashref;
return $link;
}
Hopefully that'll do the trick
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!
Try linking this in link.html;
Code:
<a href="javascript:void(0)" onclick="window.open('<%config.db_cgi_url%>/page.cgi?p=google_map;ID=<%ID%>','map','width=300,height=200,menubar=yes,status=yes,location=yes,toolbar=yes,scrollbars=yes')">View Map</a>..then, make a new template called "google_map.html". Put the following code in it:
Code:
<%load_link_details($ID)%> <html>
<head>
<title>Map for <%Title%></title>
<body>
<%Plugins::GoogleMap::LoadMap($ID)%>
<%-- 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 align="center" 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(<%LatVal%>,<%LongVal%>);
map.setCenter(center, 15);
map.enableContinuousZoom();
map.addControl(new GLargeMapControl());
map.addControl(new GMapTypeControl());
m0 = new GMarker(new GLatLng(<%LatVal%>,<%LongVal%>));
GEvent.addListener(m0, "click", function() {
m0.openInfoWindowHtml("<h2>fff</h2>");
});
map.addOverlay(m0);
}
else {
alert("Your browser is not compatible with the mapping tool.");
}
//]]>
</script>
<%endif%>
<%-- END GOOGLE MAP STUFF --%>
</body>
</html>
Now, you need to make a new global - called "load_link_details", with the following code:
Code:
sub { my $link = $DB->table('Links')->select( { ID => $_[0] } )->fetchrow_hashref;
return $link;
}
Hopefully that'll do the trick
Cheers
Andy (mod)
andy@ultranerds.co.uk
Want to give me something back for my help? Please see my Amazon Wish List
GLinks ULTRA Package | GLinks ULTRA Package PRO
Links SQL Plugins | Website Design and SEO | UltraNerds | ULTRAGLobals Plugin | Pre-Made Template Sets | FREE GLinks Plugins!