Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 2 of 2

Thread: google maps

  1. #1
    New to the CF scene
    Join Date
    Feb 2012
    Posts
    3
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Exclamation google maps

    I have some problems with intergrating google maps into my page

    I cant seem to get a marker to appear on my map. I have tried numerous methods but non seem to work.

    I have integrated the google maps on my main site, repositioned and re-sized.

    The code below is a test page i work on to get code to work. It's just a map on a page

    entire code:
    <!DOCTYPE HTML>
    <html>
    <head>
    <meta name="viewport" content="initial-scale=1.0, user-scalable=no" />
    <style type="text/css">
    html { height: 100% }
    body { height: 100%; margin: 25px; padding: 25px }
    #map_canvas { height: 100% }
    </style>
    <script type="text/javascript"
    src="http://maps.googleapis.com/maps/api/js?key=AIzaSyDrxZnpYBNIwzBFVYaDY__BMONEjNEGZaI&sensor=false">
    </script>
    <script type="text/javascript">
    function initialize() {
    var myLatlng = new google.maps.LatLng(-25.363882,131.044922);
    var myOptions = {
    zoom: 4,
    center: myLatlng,
    mapTypeId: google.maps.MapTypeId.ROADMAP
    }
    var map = new google.maps.Map(document.getElementById("map_canvas"), myOptions);}
    var marker = new google.maps.Marker({
    position: myLatlng,
    map: map,
    title:"Hello World!"
    });

    </script>
    </head>

    <body onload="initialize()">
    <div id="map_canvas" style="width:100%; height:100%"></div>
    </body>
    </html>

    can anybody tell my where i am going wrong and just the map appears with no marker?


    thanks

  • #2
    Senior Coder xelawho's Avatar
    Join Date
    Nov 2010
    Posts
    2,969
    Thanks
    56
    Thanked 557 Times in 554 Posts
    Quote Originally Posted by beg-prog View Post
    can anybody tell my where i am going wrong and just the map appears with no marker?
    somebody already did
    http://www.webdeveloper.com/forum/sh...d.php?t=257366


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •