- Google Maps: Overlay point not showing up
- <head>
- <title>Test Google Maps</title>
- <script src="http://maps.google.com/maps?file=api&v=2&key=AIzaSyAXsNu2EwRNqKJn9OmC19WPkEJFM0r6ALk&sensor=true"
- type="text/javascript"></script>
- <script type="text/javascript">
- function initialize() {
- // var myOptions = {
- // zoom: 16,
- // center: new google.maps.LatLng(40.750159, -73.976473),
- // disableDefaultUI: true,
- // mapTypeId: google.maps.MapTypeId.ROADMAP
- // }
- // var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
- // var point = new GLatLng(40.750159, -73.976473);
- // map.addOverlay(new GMarker(point));
- var map = new GMap2(document.getElementById("map_canvas"));
- map.setCenter(new GLatLng(40.750159, -73.976473), 13);
- map.setUIToDefault();
- var myGeographicCoordinates = new GLatLng(40.750159, -73.976473)
- map.addOverlay(new GMarker(myGeographicCoordinates));
- // map.addOverlay(new GMarker(40.750159, -73.976473));
- }
- </script>
- </head>
- <body onload="initialize()" onunload="GUnload()">
- <div id="map_canvas" style="width: 450px; height: 370px"></div>
- </body>
- <head>
- <title>Test Google Maps</title>
- <script type="text/javascript" src="https://maps.googleapis.com/maps/api/js?sensor=false"></script>
- <script type="text/javascript">
- function initialize() {
- var myOptions = {
- zoom: 16,
- center: new google.maps.LatLng(40.750159, -73.976473),
- disableDefaultUI: true,
- mapTypeId: google.maps.MapTypeId.ROADMAP
- }
- var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
- var myGeographicCoordinates = new google.maps.LatLng(40.750159, -73.976473);
- var marker = new google.maps.Marker({
- map: map,
- position: myGeographicCoordinates,
- title: "My First Test Marker",
- visible: true
- });
- }
- </script>
- </head>
- <body onload="initialize()" onunload="GUnload()">
- <div id="map_canvas" style="width: 450px; height: 370px"></div>
- </body>
- new GLatLng(40.750159, -73.976473);
- new google.maps.LatLng(40.750159, -73.976473);
- var marker = new google.maps.Marker({
- map: map,
- position: latLng
- });
- function initialize() {
- var myOptions = {
- zoom: 16,
- center: new google.maps.LatLng(40.750159, -73.976473),
- disableDefaultUI: true,
- mapTypeId: google.maps.MapTypeId.ROADMAP
- }
- var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);
- var myGeographicCoordinates = new GLatLng(40.750159, -73.976473);
- var marker = new google.maps.Marker({
- map: map,
- position: myGeographicCoordinates
- });
- }
- map.addOverlay(new GMarker(myGeographicCoordinates));
- var marker = new google.maps.Marker({
- map: map,
- position: myGeographicCoordinates,
- title: "My First Test Marker",
- visible: true
- });
- var marker = new google.maps.Marker({
- map: map,
- icon: "images/my-nice-marker.png",
- position: myGeographicCoordinates,
- title: "My First Test Marker",
- visible: true
- });