[Geomoose-users] Request

Simon Gathuri simon.gathuri at yahoo.com
Mon Jul 20 19:36:23 PDT 2015


Am trying to put a point marker at lat,long (-1.243,36.847) using google map Api. This code doesnt seem to work in geomoose. It displays the map well but i dont see the marker. I dont know where am getting wrong.
<style>
      html, body, #map-canvas {
        height: 100%;
        margin: 0;
        padding: 0;
      }

    </style>
 <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&signed_in=true"></script>
    <script>
function initialize() {
  var myLatlng = new google.maps.LatLng(-1.243,36.847);
  var mapOptions = {
    zoom: 4,
    center: myLatlng
  }
  var map = new google.maps.Map(document.getElementById('map-canvas'), mapOptions);

  var marker = new google.maps.Marker({
      position: myLatlng,
      map: map,
      title: 'test'
  });
}

google.maps.event.addDomListener(window, 'load', initialize);

    </script>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.osgeo.org/pipermail/geomoose-users/attachments/20150721/a6f957ca/attachment.html>


More information about the Geomoose-users mailing list