Results 1 to 4 of 4

Thread: How to add Google Earth placemarks on website

  1. #1
    Join Date
    Jan 2009
    Posts
    65

    How to add Google Earth placemarks on website

    Hi, Morning to everyone. I had created a new website few days before and wanted to know how can I set up google earth for my website? I don't know how to add placemark on website. Can anyone suggest me to add placemark on my website? I have tried so much but unable to get any solution over it. So, just give me solution. I am waiting for your reply. Try to send it as soon as possible.

  2. #2
    Join Date
    May 2008
    Posts
    2,012

    Re: How to add Google Earth placemarks on website

    Hi, you can directly go to the google site and from there you can get instructions regarding the adding placemark you your website of the google earth. So, it just needed to visit the google earth site and follow the instructions which it provide you. It will give you what you want. Basically I don't know how to do this, but my friend told me that google directly provide you to do by itself. You need to just ask him to do this.

  3. #3
    Join Date
    Apr 2008
    Posts
    2,005

    Re: How to add Google Earth placemarks on website

    hello friend, I also faced this problem before few days. And I have got solution for it by google. It is providing you code which you need to use. I had used it and got solution, suggesting you to use this.

    <html>
    <head>
    <title>Sample</title>
    <script src="http://www.google.com/jsapi?key=ABCDEFG"> </script>
    <script type="text/javascript">
    var ge;
    google.load("earth", "1");

    function init() {
    google.earth.createInstance('map3d', initCB, failureCB);
    }

    function initCB(instance) {
    ge = instance;
    ge.getWindow().setVisibility(true);
    }

    function failureCB(errorCode) {
    }

    google.setOnLoadCallback(init);
    </script>

    </head>
    <body>
    <div id="map3d" style="height: 400px; width: 600px;"></div>
    </body>
    </html>



    Use it.

  4. #4
    Join Date
    May 2008
    Posts
    2,297

    Re: How to add Google Earth placemarks on website

    Hi, I am also facing same problem as you. I am searching for this from 2 days, but unable to get it. Google says that I have to use the following code:

    var ge;
    var counter = 0;
    google.load("earth", "1");
    function init()
    {
    google.earth.createInstance('map3d', initCallback, failureCallback); addSampleButton('Create a Placemark!', buttonClick);
    }

    function initCallback(instance)
    {
    ge = instance; ge.getWindow().setVisibility(true);
    ge.getNavigationControl().setVisibility(ge.VISIBILITY_AUTO);
    ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS, true);
    ge.getLayerRoot().enableLayerById(ge.LAYER_ROADS, true);
    var la = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
    la.setRange(100000);
    ge.getView().setAbstractView(la);
    createPlacemark();
    document.getElementById('installed-plugin-version').innerHTML =
    ge.getPluginVersion().toString();
    }

    function failureCallback(errorCode)
    {
    }

    function createPlacemark() {var placemark = ge.createPlacemark(''); placemark.setName("placemark" + counter);ge.getFeatures().appendChild(placemark);

    var icon = ge.createIcon('');
    icon.setHref('http://maps.google.com/mapfiles/kml/paddle/red-circle.png');
    var style = ge.createStyle('');
    style.getIconStyle().setIcon(icon);
    placemark.setStyleSelector(style);

    var la = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);
    var point = ge.createPoint('');
    point.setLatitude(la.getLatitude());
    point.setLongitude(la.getLongitude());
    placemark.setGeometry(point);
    counter++;
    }

    function buttonClick()
    {
    createPlacemark();
    }


    It is too much confusing. If you got some simple, please reply to me.
    Last edited by Zecho; 16-11-2009 at 10:36 AM.

Similar Threads

  1. Is there any portable version of Google Earth or Google Maps
    By Calverta in forum Technology & Internet
    Replies: 5
    Last Post: 05-07-2012, 10:38 AM
  2. Replies: 4
    Last Post: 13-08-2010, 09:02 AM
  3. Google earth
    By Vaio FE41Z in forum Vista Help
    Replies: 11
    Last Post: 15-12-2009, 04:35 AM

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
Page generated in 1,714,008,904.66579 seconds with 17 queries