Nieuw lid |
|
bedankt voor de reactie!
de adressen staan in een database, en de markers worden op de kaart geplaatst, echter niet allemaal, hoewel ze wel in de html source-code staan..
hier de code:
<script type="text/javascript">
//<![CDATA[
$(function(){
if(GBrowserIsCompatible()) {
var map = new GMap2(document.getElementById("bigmap"));
var geo = new GClientGeocoder();
var icon = new GIcon();
icon.image = "<?php echo $_BASEURL_SITE ?>images/marker.gif";
icon.iconSize = new GSize(25,25);
icon.transparent = "<?php echo $_BASEURL_SITE ?>images/marker_ie.png";
icon.iconAnchor = new GPoint(12,13);
icon.infoWindowAnchor = new GPoint(25,0);
/** zoom city */
geo.getLatLng(
"<?php echo $this->navigation->parsedPlaats() ?>, Nederland",
function(point) {
if (!point) {
} else {
map.setCenter(point, 10);
}
}
);
<?php
$pc = count($results);
for($p=0; $p<$pc; $p++){
$oId = $results[$p];
$city = getObjectField($oId, "plaats");
$postal = getObjectField($oId, "postcode");
$address = getObjectField($oId, "adres");
if($city != -1){
$city = getObjectField($city, "naam");
}
$url = FriendlyURLs::getObjectURL($city, $oId);
?>
geo.getLatLng(
"<?php echo $address .", ". $postal ?>, Nederland",
function(point) {
if (!point) {
} else {
var marker = new GMarker(point, {
icon: icon,
title: "<?php echo $address .", ". $city ?>"
});
GEvent.addListener(marker, "click", function() {
marker.openInfoWindowHtml('<div><a href="<?php echo $url ?>"><?php echo $address .", ". $city ?></a><br /><?php $this->util->outputFirstThumbnail($oId) ?></div>');
});
map.addOverlay(marker);
}
}
);
<?php
}
?>
map.addControl(new GSmallMapControl());
map.addControl(new GMapTypeControl());
map.disableScrollWheelZoom();
$(document).unload(function(){
GUnload();
});
}
});
//]]>
</script>
<script type="text/javascript"> //<![CDATA[ $(function(){ if(GBrowserIsCompatible()) { var map = new GMap2(document.getElementById("bigmap")); var geo = new GClientGeocoder(); var icon = new GIcon(); icon.image = " <?php echo $_BASEURL_SITE ?>images/marker.gif"; icon.iconSize = new GSize(25,25); icon.transparent = " <?php echo $_BASEURL_SITE ?>images/marker_ie.png"; icon.iconAnchor = new GPoint(12,13); icon.infoWindowAnchor = new GPoint(25,0); /** zoom city */ geo.getLatLng( " <?php echo $this->navigation->parsedPlaats() ?>, Nederland", function(point) { if (!point) { } else { map.setCenter(point, 10); } } ); <?php for($p=0; $p<$pc; $p++){ $oId = $results[$p]; $city = getObjectField($oId, "plaats"); $postal = getObjectField($oId, "postcode"); $address = getObjectField($oId, "adres"); if($city != -1){ $city = getObjectField($city, "naam"); } $url = FriendlyURLs::getObjectURL($city, $oId); ?> geo.getLatLng( " <?php echo $address .", ". $postal ?>, Nederland", function(point) { if (!point) { } else { var marker = new GMarker(point, { icon: icon, title: " <?php echo $address .", ". $city ?>" }); GEvent.addListener(marker, "click", function() { marker.openInfoWindowHtml('<div><a href=" <?php echo $url ?>"> <?php echo $address .", ". $city ?></a><br /> <?php $this->util->outputFirstThumbnail($oId) ?></div>'); }); map.addOverlay(marker); } } ); <?php } ?> map.addControl(new GSmallMapControl()); map.addControl(new GMapTypeControl()); map.disableScrollWheelZoom(); $(document).unload(function(){ GUnload(); }); } }); //]]> </script>
in die link staat niet echt iets, alleen iets over een while lus?? zou ik daar wat aan hebben? zo ja, hoe implementeer ik dat?
Alvast bedankt!!
|