Hello everybody, i have a working example, i give latitude and
longtitude and i successfully navigate to the position. My problem now
is how to add a marker at this position. My current code is this.
<!DOCTYPE html>
<html>
<head>
<?php $longitude = $_GET['longitude'] ?>
<?php $latitude = $_GET['latitude'] ?>
<?php $zoom = $_GET['zoom'] ?>
<meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
<style type="text/css">
html { height: 100% }
body { height: 100%; margin: 0px; padding: 0px }
#map_canvas { height: 100% }
</style>
<script type="text/javascript" src="http://maps.google.com/maps/api/js?
sensor=true"></script>
<script type="text/javascript">
function initialize() {
var latlng = new google.maps.LatLng(<?php echo $latitude ?>, <?php
echo $longitude ?>);
var myOptions = {
zoom: <?php echo $zoom ?>,
center: latlng,
mapTypeId: google.maps.MapTypeId.ROADMAP
};
var map = new
google.maps.Map(document.getElementById("map_canvas"), myOptions);
}
</script>
</head>
<body onload="initialize()">
<div id="map_canvas" style="width:100%; height:100%"></div>
</body>
</html>
?>
--
You received this message because you are subscribed to the Google Groups
"Google Maps JavaScript API v3" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/google-maps-js-api-v3?hl=en.