<div class="content-add01">
	<div class="heading01"><h1>Positionnement du fournisseur : <?php echo $katao_supplier->getName() ?></h1></div>
</div>

<form action="<?php echo url_for('@katao_supplier_gmap?id=' . $katao_supplier->getId()) ?>" method="post">

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

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

<input type="submit" value="Sauver" /> ou <a href="<?php echo url_for('kataoSupplier/index') ?>">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($("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/green-dot.png";
		icon.iconSize = new GSize(32, 32);
		icon.iconAnchor = new GPoint(16, 32);

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

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

	}
}

/* ]]> */
</script>

<div id="map_canvas" style="width: 735px; height: 500px"></div>

</form>