Σελίδες

Παρασκευή 12 Δεκεμβρίου 2014

Embed KML Google Earth project

You can embed your Google Earth Project in your website or blog by using this Embed KML replasement gadgetThis is an attempt to replicate the functionality of the real KML Embed Gadget provided by Google, which is currentl offline. Made by Diemos Informatics, for Space Telescopes Website but it can be used in any Website or Blog.  It is relies on Google's Blogspot Servers stability. Based on this XML file.
The iframe generated by this tool, comes with absolutely NO warranty, Google could discontinue, or break the Google Earth API and/or Google Maps API v3 and/or Blogger servers, that this relies on - at any time. This feature is in no way endorsed by Google Inc.

In order to embed your Google Earth project visit Blogger KML Embed Gadget if it is a simle kml or map link.


Google Earth KML

Τετάρτη 10 Δεκεμβρίου 2014

Make A Blank Template In Blogger


Create a Blank Blogger Template Or Convert your blog's template to a blank HTML page. You can use this to create your own Blogger Temlate.
If you are trying to create a Blogger Template from scratch, the first thing you need is a blank HTML page.

1. Login to Blogger > Dashboard
2. Create a New Blog > Select Simple Blogger Template
3. Click on Drop Down Menu and select Template
4. Click on Edit HTML > Proceed.
5. Delete all codes and paste below codes of Blank Blogger Template

<?xml version="1.0" encoding="UTF-8" ?>
<!-- 

Make A Blank Template In Blogger  
Made by Diemos Informatics, http://diemosinformatics.blogspot.com 

(You are free to take a copy of this html file and host it on your own server!) 

-->

 <head>
  <meta content='IE=EmulateIE7' http-equiv='X-UA-Compatible'/> 
  <b:if cond='data:blog.isMobile'> 
   <meta content='width=device-width,initial-scale=1.0,minimum-scale=1.0,maximum-scale=1.0' name='viewport'/> 
  <b:else/> 
   <meta content='width=1100' name='viewport'/> 
  </b:if> 
  <b:include data='blog' name='all-head-content'/>
  <title><data:blog.pageTitle/></title>
  <b:skin><![CDATA[
   /* 
    body { 
     font: $(body.font); 
     color: $(body.text.color); 
     background: $(body.background); 
     padding: 0 $(content.shadow.spread) $(content.shadow.spread) $(content.shadow.spread); 
     $(body.background.override) margin: 0; 
     padding: 0; 
    }
   
  img {
    float: right;
}]]></b:skin>
<title> YOUR PAGE TITLE</title>

 </head>
 <body bgcolor='YOUR HEX COLOR NUMBER'>
   <b:section class='main' id='main' showaddelement='yes'/>
  <!-- Please Keep The Credits -->
 <center><a href="http://diemosinformatics.blogspot.com">Make A Blank Template In Blogger  By Diemos Informatics</a></center> </div> 
 </body>
</html>





Embed KMZ Tour Project

You can embed your Google Earth Project in your website or blog by using this Embed KMZ tour replasement gadget! This page is an attempt to replicate the functionality of the real KML Embed Gadget provided by Google, which is currentl offline. Made by Diemos Informatics, for Space Telescopes Website but it can be used in any Website or Blog.  It is relies on Google's Blogspot Servers stability. Based on this XML file.
The iframe generated by this tool, comes with absolutely NO warranty, Google could discontinue, or break the Google Earth API and/or Google Maps API v3 and/or Blogger servers, that this relies on - at any time. This feature is in no way endorsed by Google Inc.

In order to embed your Google Earth project  Blogger Embed KMZ Tour Gadget if it is a KMZ tour.

There is also a Embed KML  Gadget Maker. 


Google Earth KMZ Tour

Κυριακή 12 Οκτωβρίου 2014

Simple KML XML file

Keyhole Markup Language (KML) is an XML notation for expressing geographic annotation and visualization within Internet-based, two-dimensional maps and three-dimensional Earth browsers. KML became an international standard of the Open Geospatial Consortium in 2008. Google Earth was the first program able to view and graphically edit KML files. Other projects such as Marble have also started to develop KML support.

You can create KML files with the Google Earth user interface, or you can use an XML or simple text editor to enter "raw" KML from scratch.

<?xml version="1.0" encoding="UTF-8"?>
<Module>
<!--
Copyright 2009 Google Inc.

Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at

     http://www.apache.org/licenses/LICENSE-2.0

Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
-->
  <ModulePrefs
    title="Embedded KML Viewer"
    title_url="http://www.gmodules.com/ig/creator?synd=open&url=http://www.nearby.org.uk/google/embedkmlgadget-v3-ll.xml"
    directory_title="Embedded KML Viewer"
    thumbnail="http://code.google.com/apis/kml/embed/res/embedkmlgadget-thumb.png"
    screenshot="http://code.google.com/apis/kml/embed/res/embedkmlgadget-screen.png"
    author="Roman Nurik"
    author_email="api.roman.public+embedkmlgadget@gmail.com"
    author_affiliation="Google"
    width="500"
    height="400"
    description="Embed a KML file in your page using Google Earth or Google Maps!">
    <Locale lang="en" country="us"/>
  </ModulePrefs>
  
  <UserPref name="kml_url" display_name="KML or My Maps URL"/>
  <UserPref name="view_mode" display_name="View mode" default_value="earth" datatype="enum">
    <EnumValue value="maps" display_value="2D (Google Maps)"/>
    <EnumValue value="earth" display_value="3D (Google Earth Plugin)"/>
  </UserPref>
  <UserPref name="lat" display_name="Optional - Center Latitude (leave blank to center on KML file)"/>
  <UserPref name="lng" display_name="Optional - Center Longitude (leave blank to center on KML file)"/>
  <UserPref name="zoom" display_name="Maps zoom level - Optional"/>
  <UserPref name="earth_2d_fallback" display_name="3D - Fall back to 2D on error" datatype="bool"/>
  <UserPref name="earth_fly_from_space" display_name="3D - Fly in from space" default_value="true" datatype="bool"/>
  <UserPref name="earth_show_nav_controls" display_name="3D - Show navigation controls" default_value="1" datatype="bool"/>
  <UserPref name="earth_show_buildings" display_name="3D - Show buildings" default_value="1" datatype="bool"/>
  <UserPref name="earth_show_terrain" display_name="3D - Show 3D terrain" default_value="1" datatype="bool"/>
  <UserPref name="earth_show_roads" display_name="3D - Show roads" default_value="1" datatype="bool"/>
  <UserPref name="earth_show_borders" display_name="3D - Show borders and labels" default_value="1" datatype="bool"/>
  <UserPref name="earth_sphere" display_name="3D - Sphere" default_value="earth" datatype="enum">
    <EnumValue value="earth" display_value="Earth"/>
    <EnumValue value="sky" display_value="Sky"/>
    <EnumValue value="moon" display_value="Moon"/>
    <EnumValue value="mars" display_value="Mars"/>
  </UserPref>
  <UserPref name="maps_streetview" display_name="2D - Enable Streetview" datatype="bool"/>
  <UserPref name="maps_zoom_out" display_name="2D - Zoom out on load" datatype="bool"/>
  <UserPref name="maps_default_type" display_name="2D - Default Map Type" default_value="map" datatype="enum">
    <EnumValue value="map" display_value="Map"/>
    <EnumValue value="satellite" display_value="Satellite"/>
    <EnumValue value="hybrid" display_value="Hybrid"/>
    <EnumValue value="terrain" display_value="Terrain"/>
  </UserPref>
  
  <Content type="html"><![CDATA[
<script type="text/javascript" src="http://www.google.com/jsapi?hl=en&key=ABQIAAAAKkfkHb2nXsD0o1OX2TbdkRTZdFmpiU8vv3PBIA-hr88t-5BzzxQjEeEmKaZUy66ADwTlY8x2M14hHg"></script>
<script type="text/javascript">
  google.load('earth', '1');
  google.load('maps', '3', {"other_params":"sensor=false"});

  var ge = null;
  var map = null;
  var prefs = new _IG_Prefs();
  
  var appPath = 'http://code.google.com/apis/kml/embed/';

  /**
   * Prepare to create the gadget UI.
   */
  function initGadget(viewMode) {
    // Bugfix for IE6.
    var c = document.getElementById('mapcontainer');
    while (c && c.offsetParent != c) {
      c.style.height = '100%';
      c = c.offsetParent;
    }
    
    createGadgetUI(prefs.getString('view_mode'));
  }
  
  /**
   * Create the gadget UI, which consists of either a Google Map or a
   * Google Earth Plugin instance.
   */
  function createGadgetUI(viewMode) {
    var kmlUrl = prefs.getString('kml_url');
    
    // Clean kmlUrl to accept My Maps URLs.
    myMapsMatch = kmlUrl.match(/maps\.google\.[a-z]+.*msid=([0-9a-f.]+)/);
    if (myMapsMatch) {
      kmlUrl = 'http://maps.google.com/maps/ms?msa=0&output=kml&msid=' +
          myMapsMatch[1];
    }
    
    if (viewMode == 'maps') {
      // Create a V3 Google Map.
      if (prefs.getString('lat') && prefs.getString('lng')) {
         var myLatlng = new google.maps.LatLng(parseFloat(prefs.getString('lat')),parseFloat(prefs.getString('lng')));
      } else {
         var myLatlng = new google.maps.LatLng(0,0);
      }
      var myMapType = google.maps.MapTypeId.ROADMAP

      var defaultMapType = prefs.getString('maps_default_type');
      if (defaultMapType == 'satellite')
        myMapType = google.maps.MapTypeId.SATELLITE
      else if (defaultMapType == 'hybrid')
        myMapType = google.maps.MapTypeId.HYBRID
      else if (defaultMapType == 'terrain')
        myMapType = google.maps.MapTypeId.TERRAIN;

      var myOptions = {
        zoom: 1,
        center: myLatlng,
        mapTypeId: myMapType
      }
      if ( prefs.getString('zoom') )
        myOptions['zoom'] = parseInt(prefs.getString('zoom'));


      if ( prefs.getBool("maps_streetview"))
        myOptions['streetViewControl'] = true;

      map = new google.maps.Map(document.getElementById('mapcontainer'),myOptions);

      if (kmlUrl) {
        // Apply a cachebuster.
        kmlUrl += (kmlUrl.indexOf('?') >= 0 ? '&' : '?') +
            Number(new Date()).toString();

        var myKmlOptions = {
     map: map
 }
 if (prefs.getBool('maps_zoom_out'))
   myKmlOptions['preserveViewport'] = true;

        var kmlLayer = new google.maps.KmlLayer(kmlUrl,myKmlOptions);

      }
    } else if (viewMode == 'earth') {
      if (!google.earth.isInstalled() &&
          prefs.getBool('earth_2d_fallback')) {
        // Fall back to Maps if the Google Earth Plugin isn't installed.
        createGadgetUI('maps');
        return;
      }
      
      // Determine which sphere to create (earth/sky/moon/mars).
      var createOptions = {};
      var sphere = prefs.getString('earth_sphere') || 'earth';

      if (sphere == 'mars' || sphere == 'moon')
        createOptions = { database: 'http://khmdb.google.com/?db=' + sphere };

      google.earth.createInstance('mapcontainer', function(pluginInstance) {
        ge = pluginInstance;
        
        if (sphere == 'sky')
          ge.getOptions().setMapType(ge.MAP_TYPE_SKY);      
        
        ge.getWindow().setVisibility(true);

        // Set options.
        ge.getNavigationControl().setVisibility(
            prefs.getBool('earth_show_nav_controls') ? ge.VISIBILITY_AUTO : ge.VISIBILITY_HIDE);

        if (sphere == 'earth') {
          ge.getLayerRoot().enableLayerById(ge.LAYER_BUILDINGS,
              prefs.getBool('earth_show_buildings'));

          ge.getLayerRoot().enableLayerById(ge.LAYER_TERRAIN,
              prefs.getBool('earth_show_terrain'));

          ge.getLayerRoot().enableLayerById(ge.LAYER_ROADS,
              prefs.getBool('earth_show_roads'));

          ge.getLayerRoot().enableLayerById(ge.LAYER_BORDERS,
              prefs.getBool('earth_show_borders'));
        }

        if (kmlUrl) {
          // If loading KML, create a KmlNetworkLink with a flyToView=1.
          var link = ge.createLink('');
          link.setHref(kmlUrl);

          var nl = ge.createNetworkLink('');
          nl.setLink(link);

 if (prefs.getString('lat') && prefs.getString('lng')) {
// Get the current view
var lookAt = ge.getView().copyAsLookAt(ge.ALTITUDE_RELATIVE_TO_GROUND);

// Set new latitude and longitude values
lookAt.setLatitude(parseFloat(prefs.getString('lat')));
lookAt.setLongitude(parseFloat(prefs.getString('lng')));

if ( prefs.getString('zoom') ) {
// $zoom = (-1.4956 * log($range/1000)) + 16.529;
var zoom = parseInt(prefs.getString('zoom'),10);
var range =  1000*Math.pow(Math.E,(zoom-16.529)/-1.4956);
lookAt.setRange(Math.round( range ));
}

// Update the view in Google Earth
ge.getView().setAbstractView(lookAt);
} else {
          nl.setFlyToView(true);
}  
          var originalFlyToSpeed = ge.getOptions().getFlyToSpeed();
          if (!prefs.getBool('earth_fly_from_space'))
            ge.getOptions().setFlyToSpeed(ge.SPEED_TELEPORT);
          
          ge.getFeatures().appendChild(nl);
          
          window.setTimeout(function() {
            ge.getOptions().setFlyToSpeed(originalFlyToSpeed);
          }, 500);
        }
      }, function(error) {
        if (prefs.getBool('earth_2d_fallback')) {
          // Upon plugin creation failure, use Maps as a fallback.
          createGadgetUI('maps');
        }
      }, createOptions);
    }
  }
  
  google.setOnLoadCallback(initGadget);
</script>
<div id="mapcontainer" style="width: 100%; height: 100%;"></div>
]]></Content>
</Module>