<div class="content-add01">
	<div class="heading01"><h1>Mon profil</h1></div>
</div>

<?php echo form_tag('@profile_gmap') ?>

<?php echo input_hidden_tag('gmap_lng', $katao_member_or_supplier->getGmapLng()) ?>
<?php echo input_hidden_tag('gmap_lat', $katao_member_or_supplier->getGmapLat()) ?>

<p><i>Modifier ci-dessous votre positionnement sur la carte en déplaçant le pion.</i></p>

<?php echo submit_tag('Sauver') ?> ou <a href="<?php echo url_for('@profile') ?>">annuler</a><br /><br />

<script type="text/javascript" src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=<?php echo sfConfig::get('app_gmap') ?>&sensor=true"></script>

<script type="text/javascript" language="JavaScript">
/* <![CDATA[ */

window.onload = function(){
	if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map_canvas"));
		map.setCenter(new GLatLng(45, 3), 6);
        map.setUIToDefault();

        // "tiny" marker icon
		var icon = new GIcon();
		icon.image = "http://maps.google.com/mapfiles/ms/micons/red-dot.png";
		icon.iconSize = new GSize(32, 32);
		icon.iconAnchor = new GPoint(16, 32);

		var point = new GLatLng(<?php echo (int)$katao_member_or_supplier->getGmapLat() ?>,<?php echo (int)$katao_member_or_supplier->getGmapLng() ?>);

		var markerD = new GMarker(point, {icon:icon, draggable: true});
		map.addOverlay(markerD);
		markerD.enableDragging();
		GEvent.addListener(markerD, "drag", function(){
			document.getElementById("gmap_lng").value = markerD.getPoint().lng();
			document.getElementById("gmap_lat").value = markerD.getPoint().lat();
		});

	}
}

/* ]]> */
</script>

<div id="map_canvas" style="width: 385px; height: 350px"></div>

</form>