[pmwiki-devel] Duplicate Header Output
Craige Leeder
craige at internetadvisor.ca
Wed Nov 22 15:00:34 CST 2006
Still working on my Google Maps wiki inteface, and it's coming allong.
The problem I'm having now is with Duplicate Header output (sortof) when
I use more then one of my markup tags on a page.
The problem exactly is with the reproduced opening javascript that is
set for the entire page. IE:
(:map address="1600 Amphitheatre Pky, Mountain View, CA":)
(:map-location address="1600 Amphitheatre Pky, Mountain View, CA":)
results in:
<script type="text/javascript">
//<![CDATA[
var map = null;
var geocoder = null;
function load() {
var map = new GMap2(document.getElementById("map"));
var geocoder = new GClientGeocoder();
if (GBrowserIsCompatible()) {
geocoder.getLatLng(
'1600 Amphitheatre Pky, Mountain View, CA',
function(point) {
if (!point) {
alert(" not found");
} else {
map.setCenter(point, 13);
}
});
} }
//]]>
</script>
<script type="text/javascript">
//<![CDATA[
var map = null;
var geocoder = null;
function load() {
var map = new GMap2(document.getElementById("map"));
var geocoder = new GClientGeocoder();
if (GBrowserIsCompatible()) {
geocoder.getLatLng(
'1600 Amphitheatre Pky, Mountain View, CA',
function(point) {
if (!point) {
alert(" not found");
} else {
map.setCenter(point, 13);
}
});
} }
//]]>
</script>
geocoder.getLatLng(
'1600 Amphitheatre Pky, Mountain View, CA',
function(point) {
if (!point) {
alert(" not found");
} else {
map.setCenter(point, 13);
}
});
} }
//]]>
</script>
Where as what I'm expercing is:
<script type="text/javascript">
//<![CDATA[
var map = null;
var geocoder = null;
function load() {
var map = new GMap2(document.getElementById("map"));
var geocoder = new GClientGeocoder();
if (GBrowserIsCompatible()) {
geocoder.getLatLng(
'1600 Amphitheatre Pky, Mountain View, CA',
function(point) {
if (!point) {
alert(" not found");
} else {
map.setCenter(point, 13);
var marker = new GMarker(point);
map.addOverlay(marker);
marker.openInfoWindowHtml(address);
}
});
}
}
//]]>
</script>
(now that I look at it, the javascript isn't right either)
I've attached my code. As you see, it is starting to get a little more
complex then what it was.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: /pipermail/pmwiki-devel/attachments/20061122/fa87ccc8/attachment.html
More information about the pmwiki-devel
mailing list