Bonjour,

Dans un projet symfony j'ai installer le plugins s'appelant sfEasyGmap. Tous marche impécablement. Cependant, j'aimerai faire en sorte que si je click sur la carte, un nouveau marqueur apparait sur la carte. Voici mon code:

Code : Sélectionner tout - Visualiser dans une fenêtre à part
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
<script type='text/javascript'>
    //<![CDATA[
 
  var map = null;
  //  Call this function when the page has been loaded
  function initialize()
  {
    var mapOptions = {
      center: new google.maps.LatLng(45.57, -73.75),
      zoom: 14,
      mapTypeId: google.maps.MapTypeId.ROADMAP
    };
    map = new google.maps.Map(document.getElementById("map"), mapOptions);
    marker_4e2b1710a791d = new google.maps.Marker({
      position: new google.maps.LatLng(45.57, -73.75),
      map: map
    });
 
 
  }
window.onload = function(){initialize()};
    //]]>
  </script>
<script type="text/javascript">
$(document).ready(function(){
  google.maps.event.addListener(map, 'click', function(even)
  {
  alert("toto");
  });
  });
</script>
Malheuresement, ce code ne marche pas et j'ai l'erreur:
a is null
Error: a is null
Source File: http://maps.gstatic.com/intl/en_us/m...3/5/11/main.js
Line: 19

Pouvez vous m'aider?