I am trying to display a simple marker on my map.
I follow all the steps as shown in the example but no markers attaches.
this is the block with script:
which is the bug?
why don not I see the marker?
<script type="text/javascript">
function initialize() {
var myOptions = {
zoom: 8,
center: new google.maps.LatLng(43.1711696, 11.351473),
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new google.maps.Map(document.getElementById('object_map'),
myOptions);
var marker= new google.maps.Marker ({
position: LatLng,
title:"Mandolino"});
}
google.maps.event.addDomListener(window, 'load', initialize)
</script>
Simple example of creating markers on a map :
Working example : http://jsfiddle.net/QvNUF/95/
Update
To add a single marker do this :
you will need to replace
<yourlat>with the latitude of the marker position,<yourlong>with the longitude of your marker position and<yourmap>with the map variable you created