Jump to:

17452 Posts in 4473 Topics by 1971 members

Archive

SilverStripe Forums » Archive » Google Map from Scratch

Our old forums are still available as a read-only archive.

Moderators: martimiz, Sean, biapar, Willr, Ingo, simon_w

Page: 1
Go to End
Author Topic: 752 Views
  • vlnrajesh
    Avatar
    Community Member
    1 Post

    Google Map from Scratch Link to this post

    I would like to have a Google map which only can point out a part of the globe not the whole, for no reason. I have followed some the instructions of Developer but i am not able to succeed. More over i want to run this site on a Virtual Machine so i want the Google App to be created as http://localhost/silverstripe/

    and I got the char sequence as a API key
    ABQIAAAAR961RmwqX6JM72dPhgxpXRSl2cCGfYLKpuS8wz_6fO3TDVgOThQQiyDYY7D2EVZCJe7_dnaqrSGN_Q

    The Example webpage is this

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
    <html xmlns="http://www.w3.org/1999/xhtml">
    <head>
    <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
    <title>Google Maps JavaScript API Example</title>
    <script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=ABQIAAAAR961RmwqX6JM72dPhgxpXRSl2cCGfYLKpuS8wz_6fO3TDVgOThQQiyDYY7D2EVZCJe7_dnaqrSGN_Q"
    type="text/javascript"></script>
    <script type="text/javascript">

    //<![CDATA[

    function load() {
    if (GBrowserIsCompatible()) {
    var map = new GMap2(document.getElementById("map"));
    map.setCenter(new GLatLng(37.4419, -122.1419), 13);
    }
    }

    //]]>
    </script>
    </head>
    <body onload="load()" onunload="GUnload()">
    <div id="map" style="width: 500px; height: 300px"></div>
    </body>
    </html>

    Thanks in Advance for your help to me

    752 Views
Page: 1
Go to Top

Want to know more about the company that brought you SilverStripe? Then check out SilverStripe.com

Comments on this website? Please give feedback.