﻿<?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.
Danish version by Søren Johannessen http://www.microformats.dk
--> 
<!--
thumbnail="http://code.google.com/apis/kml/embed/res/embedkmlgadget-thumb.png"
screenshot="http://code.google.com/apis/kml/embed/res/embedkmlgadget-screen.png"
description="Embed a KML file in your page using Google Earth or Google Maps!"
--> 
  <ModulePrefs title="Wave demo Mårup Kirke ved Lønstrup" directory_title="Dansk Earth Wave" author="Søren Johannessen" author_email="soren.johannessen+danskearthwavegadget@gmail.com" author_affiliation="Private" width="750" height="550"> 
    <Locale lang="da" country="dk"></Locale> 
    <Require feature="minimessage"></Require> 
    <Require feature="wave"></Require> 
  </ModulePrefs> 
  
  
  
  <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");

var ge = null;
var fileOne = null;
var fileTwo = null;

function init() {
  google.earth.createInstance("map3d", initCB, failureCB);
}

function initCB(object) {
  ge = object;
  ge.getWindow().setVisibility(true);

  fileOne = getNL('http://www.microformats.dk/kort/maarup/maarupkirke.kml');
 

  updateOptions();
 var la = ge.createLookAt('');
  la.set(57.46239704708692, 9.784349525576232, 14, ge.ALTITUDE_RELATIVE_TO_GROUND, 
         0, 45, 450);
  ge.getView().setAbstractView(la); 

ge.getNavigationControl().setVisibility(ge.VISIBILITY_SHOW);
ge.getLayerRoot().enableLayerById(ge.LAYER_BUILDINGS, true);
ge.getOptions().setStatusBarVisibility(true);    

}

function failureCB(object) {
}


function getNL(kmlURL){
  var nl = ge.createNetworkLink("");
  var link = ge.createLink("");
  link.setHref(kmlURL);
  nl.setLink(link);
  ge.getGlobe().getFeatures().appendChild(nl);
  return nl;
}

    

function updateOptions() {
  fileOne.setVisibility(document.options.file1.checked);
 
}


</script>
</head>
 <body onload='init()' onunload="GUnload()">
 
 


<div id="map3d_container" style='border: 1px solid black; height: 550px; width:750px;'>
<div id='map3d' style='height: 100%;'></div>
</div>
<div style="display:none" id='options_container'>
    <form name="options" action='javascript:updateOptions();'>
      <input type="checkbox" onclick='updateOptions()' name="file1" checked />Fil 1
      <br />
      
    </form>
  </div>

 
]]></Content> 
</Module>

