Hi there,
I'm trying to replicate the following exemple :
http://www.leigeber.com/2008/04/map-your-users-using-the-google-maps-api-and-php/
How to integrate this PHP source code with the following Java script (replacing lat/lgt with $latitude/$longitude above ??? Looks easy but I'm a bit lost in mixing PHP and Javascript together ! ;-(
<script type="text/javascript">
function initialize() {
var map;
if (GBrowserIsCompatible()) {
map = new GMap2(document.getElementById("map_canvas"));
var zoomlevel = 9;
var lat= 50.62829913465776;
var lgt= 4.650295972824097;
map.setCenter(new GLatLng(lat, lgt), zoomlevel);
// add a marker
map.openInfoWindow(map.getCenter(), document.createTextNode ("Center of the map at (lat - lgt)= ("+lat+" - "+lgt+") ! "));
// Large Map Default UI
map.setUIToDefault();
// Map type
map.setMapType(G_PHYSICAL_MAP);
}
}
</script>
<body onload="initialize()" onunload="GUnload()">
<div id="map_canvas" style="width: 1000px; height: 600px"></div>
</body>
Thanks in advance for your help.
Hub
ps: is this the best way to do it ? is it good to use hostip.info or should I use another one ??