googleMaps plugin Tutorial 05: KML Files
Written by kksou   
Saturday, 24 March 2012

This is part 5 of a series of tutorial for the googleMaps plugin.

KML files allow you to do things such as displaying multiple markers or customized markers in your google maps.

KML Elements Supported in Google Maps

Not all KML elements are supported in Google Maps. Please refer to the following 2 documents for details:


Specifying KML files

To use kml files, use the following syntax:

{googleMaps lat=37.4319720 long=-122.0941430
zoom=12 width=100% height=480
kml=http://www.kksou.com/gmap/samples/kml_sample1.kml}

Note that you still need to specify the latitude and longitude of the center of the map.

Turning off the Marker

  • By default, a red marker will appear at the point where you specify the center of the map
  • You can turn off the red marker by using the parameter marker=0

Default Red MarkerMarker Turned Off
{googleMaps lat=37.4219720 long=-122.0841430
width=100% height=480 zoom=11 kml=http://www.kksou.com/gmap/samples/kml_sample1.kml}
{googleMaps lat=37.4219720 long=-122.0841430
width=100% height=480 zoom=11 marker=0 kml=http://www.kksou.com/gmap/samples/kml_sample1.kml}

Specifying Zoom Level

You can specify the zoom level in displaying the KML file.

Zoom = 12Zoom = 10
{googleMaps lat=37.4219720 long=-122.0841430
marker=0 width=100% height=480 zoom=12 kml=http://www.kksou.com/gmap/samples/kml_sample1.kml}
{googleMaps lat=37.4219720 long=-122.0841430
marker=0 width=100% height=480 zoom=10 kml=http://www.kksou.com/gmap/samples/kml_sample1.kml}

References for KML files

Here are some references if you wish to learn more about the KML files:

Tutorials for the googleMaps plugin

Tutorials for the googleDirections plugin

Tutorials for the googleDirections_to_here plugin


 

Comments  

 
# StefanoP. 2012-04-30 23:52
Gentle Staff,
i have put the html code this {mosmap kml='http://..........kml'|overview='1'}
but the kml file with zoom is to 2 size..why?
Where's the mistake?
Thank you
Stefano
 
 
# kksou 2012-05-01 08:29
Hi,

You are using a different plugin!

Please check the starting thttp://www.kksou.com/php-gtk2/#ag. Yours different from the one listed on this page, isn't it?

Regards,
/kksou
 
 
# StefanoP 2012-05-01 09:25
I search nothing into http://www.kksou.com/php-gtk2/#ag .....pls help me :S
 
 
# Rcrdop 2012-08-27 08:17
Thank you for great Plugin. Is there a way to not show thew bubble when you click on the marker, or change the text color. Mine comes in a very light color hard to read, so I need to either not show or make text readable
 
 
# Ricardo Quartier 2012-09-09 01:42
Dear friend, how are you?

Well i am following your lessons, everything works except lesson 5 with KML

Everything loads markers, etc, except the maps. Where the maps should be just a white background appears.

Even if I try:

{googleMaps lat=37.4319720 long=-122.0941430 zoom=12 width=100% height=480 kml=http://www.kksou.com/gmap/samples/kml_sample1.kml}

It does not work.

If i take the kml out.. works normally.

Do you have any clue, anything i can be missing?
 
 
# kksou 2012-09-17 08:56
Hi,

I used the same tag as you've written:
http://www.kksou.com/t1510/index.php?option=com_content&view=article&id=107:test-of-googlemaps-120916&catid=34:googlemaps&Itemid=54

Not sure why it didn't work on your site...

Regards,
/kksou
 
 
# Diego MF. 2012-09-26 22:55
Hi guys, your plug in is plain amazing, congratulations . I just want to know if I can add a detailed adress in the message that pops up when you mouse over the red marker. I mean it just show the Lat and Log numbers. Thanks for any help on this one. Greetings.
 
 
# kksou 2012-09-27 05:25
Hi,

Please refer to: googleMaps plugin Tutorial 01: Getting Started
http://www.kksou.com/php-gtk2/Joomla-Tips-Techniques/googleMaps-plugin-Tutorial-01-Getting-Started.php

Item #2: Specifying Label for the Marker

I suppose you have specified the address using latitude and longitude. That's why you see lat and long being displayed. All you need to do is to add the tag "label".

Please give it a try and let me know if it works, ok?

Regards,
/kksou
 
 
# geronimous 2012-10-18 05:05
Hi,

I've tried your plugin and I say "excellent" :lol: I'd like to know if is possible change the icon markers with others (personal labels). I've tried to do that but I'can't. Sorry for my english I hope that you understand. Bye
 
 
# kksou 2012-10-18 07:43
Hi,

For display different markers, you need to use KML files as outlined in this tutorial.

You may want to refer to some of the references above: "References for KML files" for more details about KML.

You can also refer to the following article for a sample code: How to display multiple markers in different colors in Google Maps using KML file? http://www.kksou.com/php-gtk2/Joomla-Google-Maps-Samples/How-to-display-multiple-markers-in-different-colors-in-Google-Maps-using-KML-file.php

Regards,
/kksou
 
 
# geronimous 2012-10-18 08:25
yes i've already seen that example but I would like to display my own markers (I'm getting crazy but nothing....). Thanks a lot in advance
 
 
# ruelluis 2012-12-12 10:17
I tried the following code, my map displays but the 10 markers in the kml does not.
{googleMaps lat=10.273983 long=124.005428 width=870 height=700 maptype=SATELLITE zoom=13 kml=http://ruelluis.podserver.info/Evacenter.kml}
 
 
# Karol 2013-01-24 10:32
How does the "kml" part work? After diplaying the map it generates the KML file in specified address, right? I cannot find any KML file at the location of my site.
I'm trying this at localhost.
 
 
# kksou 2013-01-24 17:33
Hi Karol,

No, this plugin does not generate the KML file. But it can be used to display a KML file that you have generated somewhere else.

Regards,
/kksou
 
 
# NickC 2013-02-22 00:36
Great plugin, I've used it a few times. Can't get markers from KML files to display, though. This is my code:

{googleMaps lat=52.766077 long=-1.214676 zoom=12 marker=0 kml=http://lfrs.nanagram.co.uk/maps/lfrs.kml}
 
< Prev   Next >

Blog - Forum - Privacy Policy - Contact Us
Copyright © 2006-2012. kksou.com. All Rights Reserved