salut,
désolé je suis débutant mais je souhaite obtenir les coordonnées d'une carte géographique et je les affiche .
je m'explique: j'ai le code en javascript de l'obtention des coordonnées (il y a certainement des trucs à enlever mais g pas su comment l'intégrer dans php)
voici le code:
<script src="carte de france.jpg"></script>
<script type="text/javascript">
<!--
function init(){
map.events.register("click", map, function(e) {
var lonlat = map.getLonLatFromViewPortPx(e.xy);
alert("You clicked near " + lonlat.lat + " N, " +
+ lonlat.lon + " E");
});
}
// -->
</script>
</head>
<body>
<p> </p>
<form name="form1" method="post" action="">
<tr>
<td colspan="3"> <p> </p>
<table width="694" height="23" cellpadding="0">
<tr>
<td width="343"><div id="floatScale" class="locationInfo">Echelle actuelle <span id="currentScale">1:</span></div></td>
<td width="343"><div id="floatGeo" class="locationInfo">Coord. Y / X [m] %s / %s</div></td>
</tr>
</table> <p> </p></td>
</tr>
<div id="loadbarDiv" class="dhtmldiv" style="position:absolute; z-index:3; left: 58px; top: 139px;">
<table style="width:600px;height:400px;">
<tr>
<td align="center" valign="middle"><div id="loadbar">
<div align="center">
<p>Merci de patienter...</p>
<p><img src="carte de france.jpg"<br />
</p>
</div>
</div></td>
</tr>
</table>
</div>
<div align="right">
<style>
</style>
<style>
Partager