Impossible de mettre un marqueur !
Bonjour,
Je n'arrive pas à mettre de marquer sur ma carte. La carte s'affiche bien, mais sans marqueur.
voila mon code ;
Code:
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
<script type="text/javascript">
function initialize($x, $y) {
var latlng = new google.maps.LatLng($x, $y);
var myOptions = {
zoom: 15,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById("map_canvas"),
myOptions);
var point = new GLatLng($x, $y);
var marker = new GMarker(point);
marker.setMap(map);
}
</script>
puis
<script type="text/javascript">
window.onload = function(){ var x = <?php echo $coordx;?>;
var y = <?php echo $coordy;?>;
initialize(x,y);};
</script>
carte
<div id="map_canvas" style="width:30%; height:30%"></div> |
Je ne comprend pas ! Merci de votre aide