grazioli
Goto Top

Google Earth kml-Datei in CMS (Joomla) einfügen

Hallo zusammen,

ich arbeite mit dem CMS Joomla und versuche schon den ganzen tag eine Google kml-Datei in ein Content zu legen.

Ich habe ein neuer Content angelegt und den Editor abgeschalten. Nun habe ich folgender Code in mein Content geschrieben, der eine Verknüpfung mit einer kml-Datei hat, damit mir auch der Marker angezeigt wird.

Es geht nur die Karte, aber der Marker leider nicht! Diesen wird mir einfach nicht angezeigt!

Die Verknüpfung habe ich auf zwei verschide Pfadangaben versucht:
  • E:\1Xampp\Bauerhofspielgruppe\Administrator\google_kml.kml
  • http:\\localhost\Bauerhofspielgruppe\Administrator\google_kml.kml

Vieleicht hat jemand von Euch hilfe für mich!?!


Code der im Content liegt:
<script src="http://maps.google.com/maps?file=api&amp;v=2&amp;key=API_Code"  
      type="text/javascript"></script>     <script type="text/javascript">  


    function load() {
      if (GBrowserIsCompatible()) {
        var map = new GMap2(document.getElementById("map"));  
        map.setCenter(new GLatLng(47.19145222455608, 8.869366062930851), 15); //Koordinaten die beim Start der Karte angezeigt werden
        map.addControl(new GLargeMapControl());
        map.addControl(new GMapTypeControl());
        map.setMapType(G_SATELLITE_MAP);                 //statt SATELLITE auch HYBRID oder MAP möglich
        map.addOverlay(new GGeoXml("E:/xampp/bauernhofspielgruppe\administrator\google_kml.kml"));  

      }
    }

    </script>
<div style="width: 550px; height: 440px;" id="map">&nbsp;</div>  
<script type="text/javascript">  
load();
</script>


kml-Datei
<?xml version="1.0" encoding="UTF-8"?>  
<kml xmlns="http://earth.google.com/kml/2.2">  
<Document>
	<name>KmlFile</name>
	<Style id="sh_ylw-pushpin">  
		<IconStyle>
			<color>ff00ffff</color>
			<scale>1.3</scale>
			<Icon>
				<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
			</Icon>
			<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>  
		</IconStyle>
		<LabelStyle>
			<color>ff00ffff</color>
		</LabelStyle>
	</Style>
	<Style id="sh_ylw-pushpin0">  
		<IconStyle>
			<color>ff00ffff</color>
			<scale>1.3</scale>
			<Icon>
				<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
			</Icon>
			<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>  
		</IconStyle>
		<LabelStyle>
			<color>ff00ffff</color>
		</LabelStyle>
	</Style>
	<StyleMap id="msn_ylw-pushpin0">  
		<Pair>
			<key>normal</key>
			<styleUrl>#sn_ylw-pushpin</styleUrl>
		</Pair>
		<Pair>
			<key>highlight</key>
			<styleUrl>#sh_ylw-pushpin</styleUrl>
		</Pair>
	</StyleMap>
	<Style id="sn_ylw-pushpin0">  
		<IconStyle>
			<color>ff00ffff</color>
			<scale>1.1</scale>
			<Icon>
				<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
			</Icon>
			<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>  
		</IconStyle>
		<LabelStyle>
			<color>ff00ffff</color>
		</LabelStyle>
	</Style>
	<Style id="sn_arrow">  
		<IconStyle>
			<color>ff00ffff</color>
			<scale>1.2</scale>
			<Icon>
				<href>http://maps.google.com/mapfiles/kml/shapes/arrow.png</href>
			</Icon>
			<hotSpot x="32" y="1" xunits="pixels" yunits="pixels"/>  
		</IconStyle>
		<LabelStyle>
			<color>ff00ffff</color>
		</LabelStyle>
		<ListStyle>
		</ListStyle>
	</Style>
	<StyleMap id="msn_ylw-pushpin">  
		<Pair>
			<key>normal</key>
			<styleUrl>#sn_ylw-pushpin0</styleUrl>
		</Pair>
		<Pair>
			<key>highlight</key>
			<styleUrl>#sh_ylw-pushpin0</styleUrl>
		</Pair>
	</StyleMap>
	<Style id="sn_ylw-pushpin">  
		<IconStyle>
			<color>ff00ffff</color>
			<scale>1.1</scale>
			<Icon>
				<href>http://maps.google.com/mapfiles/kml/pushpin/ylw-pushpin.png</href>
			</Icon>
			<hotSpot x="20" y="2" xunits="pixels" yunits="pixels"/>  
		</IconStyle>
		<LabelStyle>
			<color>ff00ffff</color>
		</LabelStyle>
	</Style>
	<Style id="sh_arrow">  
		<IconStyle>
			<color>ff00ffff</color>
			<scale>1.4</scale>
			<Icon>
				<href>http://maps.google.com/mapfiles/kml/shapes/arrow.png</href>
			</Icon>
			<hotSpot x="32" y="1" xunits="pixels" yunits="pixels"/>  
		</IconStyle>
		<LabelStyle>
			<color>ff00ffff</color>
		</LabelStyle>
		<ListStyle>
		</ListStyle>
	</Style>
	<StyleMap id="msn_arrow">  
		<Pair>
			<key>normal</key>
			<styleUrl>#sn_arrow</styleUrl>
		</Pair>
		<Pair>
			<key>highlight</key>
			<styleUrl>#sh_arrow</styleUrl>
		</Pair>
	</StyleMap>
	<Folder>
		<name>Meine Orte</name>
		<open>1</open>
		<Style>
			<ListStyle>
				<listItemType>check</listItemType>
				<ItemIcon>
					<state>open</state>
					<href>C:/Programme/Google/Google Earth/res/mysavedplaces_open.png</href>
				</ItemIcon>
				<ItemIcon>
					<state>closed</state>
					<href>C:/Programme/Google/Google Earth/res/mysavedplaces_closed.png</href>
				</ItemIcon>
				<bgColor>00ffffff</bgColor>
			</ListStyle>
		</Style>
		<Placemark>
			<name>Bauernhofspielgruppe</name>
			<LookAt>
				<longitude>8.870213506084511</longitude>
				<latitude>47.19145222237721</latitude>
				<altitude>0</altitude>
				<range>3071.08216793565</range>
				<tilt>14.99999999787137</tilt>
				<heading>-0.3147147566554238</heading>
				<altitudeMode>relativeToGround</altitudeMode>
			</LookAt>
			<styleUrl>#msn_arrow</styleUrl>
			<Point>
				<coordinates>8.869406437954893,47.19089782028731,0</coordinates>
			</Point>
		</Placemark>
	</Folder>
</Document>
</kml>

Content-Key: 88278

Url: https://administrator.de/contentid/88278

Printed on: April 23, 2024 at 12:04 o'clock

Member: zeytec
zeytec May 23, 2008 at 05:29:55 (UTC)
Goto Top
Member: Grazioli
Grazioli May 23, 2008 at 15:18:47 (UTC)
Goto Top
Hallo,

und Danke für Deine Antwort. Dieser Beitrag habe ich schon gefunden. Da ich dies ohne Komponente oder Mambot erledigen will, habe ich die ander möglichkeit genutzt!

Diese geht leider nicht!
Member: guenterw
guenterw Mar 31, 2010 at 11:12:11 (UTC)
Goto Top
Hallo Grazioli,

auch wenn das Thema 2 Jahre alt ist habe ich jetzt das gleiche Problem und vielleicht bekommst Du die Frage ja noch mit.

Möchte keine Komponente oder Mambot verwenden, bekomme aber einfach den Code, z.Bsp. mit "include php" eingebunden, nicht zum laufen (Karte wird nicht angezeigt).
Wie sah denn Deine Lösung aus ? - welche andere Möglichkeit hast Du benutzt ?

Danke und Gruß

guenterw