geo code change marker

3 posts by 2 authors in: Forums > CMS Builder: Plugins & Add-ons
Last Post: May 31, 2011   (RSS)

By Maurice - May 30, 2011

I'm trying to change my marker with the geo plugin in but for some reason it not working.

<script type="text/javascript">
function initialize() {
var mapCanvasId = 'map_canvas';
var mapOptions = { mapTypeId: google.maps.MapTypeId.ROADMAP };
var map = new google.maps.Map(document.getElementById(mapCanvasId), mapOptions);
var bounds = new google.maps.LatLngBounds();
var infowindow = new google.maps.InfoWindow();
var image = 'marker.png'();
var Marker = new google.maps.Marker({
position: myLatLng,
map: map,
icon: image
});
<?php
foreach ($lstAccountsRecords as $record) {
if (!$record['latitude'] || !$record['longitude']) { continue; }
$jsFunctionArgs = "{$record['latitude']}, {$record['longitude']}, {$record['num']}, '" .escapeJs($record['_link']). "'";
print " _geocoder_addMarker($jsFunctionArgs);\n";
}
?>

//
function _geocoder_addMarker(latitude, longitude, recordNum, detailLink) {
var latLng = new google.maps.LatLng(latitude, longitude);
var infowindowEl = document.getElementById('marker_infowindow_' + recordNum);
var marker = new google.maps.Marker({ map: map, position: latLng });
google.maps.event.addListener(marker, 'mouseover', function() {
if (infowindowEl) {
infowindow.setContent(infowindowEl.innerHTML);
infowindow.open(map, marker);
}
else {
window.location = detailLink;
}
});
bounds.extend(latLng);
}

//
map.fitBounds(bounds);
}

</script>


what am i doing wrong???
-------------------------------------------

Dropmonkey.nl

Re: [Jason] geo code change marker

By Maurice - May 31, 2011

Jason THANK YOU VERY MUTCH !!!!!!!!!!!!!!!!!!!!!!!!

u r the best
-------------------------------------------

Dropmonkey.nl