Je suis assez novice en matière de php. Je test l'api gmap3.
Ma carte s'affiche, mais au chargement de celle-ci, je reçois toujours la même erreur unknow action: init
Le init je sais d'où il vient mais j'en ai besoins
action: 'init',
Je suis connecter un un serveur local avec wamp. Pour afficher ma page j'utilise :http://localhost/google/test.phpdans mon repertoire du site, j'ai bien un répertoire js avec les 2 fichiers: jquery.js et gmap3.js
Voici mon code:
<!DOCTYPE html>
<html>
<head>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html{height: 100%}
body{height:100%;margin:50px;padding:00px}
.gmap3{height:70%}
</style>
<script type="text/javascript" src="js/jquery.js"></script>
<script src="http://maps.google.com/maps/api/js?sensor=false" type="text/javascript"></script>
<script type="text/javascript" src="js/gmap3.js"></script>
<script type="text/javascript">
$(function(){
$('.gmap3').gmap3(
{
action: 'init',
options:{
center:[22.49156846196823, 89.75802349999992],
zoom:8,
mapTypeId: google.maps.MapTypeId.SATELLITE,
mapTypeControl: true,
mapTypeControlOptions: {
style: google.maps.MapTypeControlStyle.DROPDOWN_MENU
},
navigationControl: true,
scrollwheel: false,
streetViewControl: false
}
}
);
});
</script>
</head>
<?php include ('include/header.php'); ?>
<body>
<div id="test1" class="gmap3 top"></div>
<div id="test2" class="gmap3 middle"></div>
<div id="test3" class="gmap3 bottom"></div>
</body>
</html>
Pouvez-vous m'aider a résoudre ce soucis?Merci