Very Important: This plugin works only with PHP5 and higher. It does not work with PHP4 because PHP4 does not support OOP multiple inheritance.
Thanks to Chaminda and Marc for sharing and highlighting this.
Tutorials
You can add a label to be displayed when the user clicks on the red marker. Please make sure you enclose the label in double quotes. For new lines, please use ~.
Hiding the Red Marker: By default, a red marker will appear at the point where you specify the center of the map. If you are displaying all markers within your KML files, you can hide the red marker by using the parameter marker=0.
Map Control: You can use the various map control as defined in Goolge Maps Controls Overview. For example, to use the large pan/zoom control as now used on Google Maps, use the following syntax:
GLargeMapControl3D - a large pan/zoom control as now used on Google Maps. Appears in the top left corner of the map by default.
GLargeMapControl - a simpler large pan/zoom control. Appears in the top left corner of the map by default.
GSmallMapControl - a smaller pan/zoom control. Appears in the top left corner of the map by default.
GSmallZoomControl3D - a small zoom control (with no panning controls) as now used on Google Maps.
GSmallZoomControl - a small zoom control (no panning controls) used in the small map blowup windows used to display driving directions steps on Google Maps.
GScaleControl - a map scale
GMapTypeControl - buttons that let the user toggle between map types (such as Map and Satellite)
GHierarchicalMapTypeControl - a selection of nested buttons and menu items for placing many map type selectors.
GOverviewMapControl - a collapsible overview map in the corner of the screen
Language option. The Google Maps API uses the browser's preferred language setting when displaying textual information such as the names for controls, copyright notices, and driving directions. If you wish to change the Maps API to ignore the browser's language setting and force it to display information in a particular language, you can add an optional lang parameter.
e.g. to display the Goolge Maps control in French, use:
Overview Map. By default, an overview map will be added to the bottom right corner of the map. To turn it off use addoverview=0.
Google Bar. By default, a Google Bar will be displayed that provides local search capabilities within Maps API applications, allowing users to search locations for local listings. For example, the user can search for restaurants or the nearest bookstores around the place. To turn it off use addgoogle=0.
Map Scale. To add a a control that displays the map scale, use addscale=1.
To make the your page containing the googleMaps plugin W3C XHTML 1.0 Transitional, here are the steps:
Install googleMaps plugin v1.5.11 and above.
Run your page through the HTML validator. If it does not validate, please do step 3.
In Joomla, the standard editor usually puts a pair of <p>...</p> around each paragraph. This will cause a problem because the following is not valid in XHTML 1.0 Transitional (you cannot have a <div> inside a <p> tag):
<p>
...
<div>
... HTML codes that inserts the google map
</div>
...
</p>
To work around this, please add a add_p=1 in your googleMaps tags as shown below:
If you find the plugin useful and would like to use the plugin without the "Powered-by" links, you may do so by purchasing a "Powered-by" removal license for only USD $10 per site.
Secured payment is processed by 2checkout.com. All major credit cards are accepted, including Visa, Mastercard and American Express, etc. You can also pay by PayPal. Once the transaction is completed, you will be given a link to download the version with the "Powered by" links removed.
v1.07 (for Joomla 1.0) and v1.57 (for Joomla 1.5)
Released May 23, 2009
Added GOverviewMapControl, GScaleControl and GoogleBar.
By default, an overview map will be added to the bottom right corner of the map. To turn it off use addoverview=0.
By default, a Google Bar will be displayed that provides local search capabilities within Maps API applications, allowing users to search locations for local listings. For example, the user can search for restaurants or the nearest bookstores around the place. To turn it off use addgoogle=0.
To add a a control that displays the map scale, use addscale=1
v1.08 (for Joomla 1.0) and v1.58 (for Joomla 1.5)
Released May 27, 2009
You can now add multiple controls, e.g.GLargeMapControl3D|GMapTypeControl. Please refer to here for more details.
v1.09 (for Joomla 1.0) and v1.59 (for Joomla 1.5)
Released May 28, 2009
The plugin now comes with a built-in geocoder! This means that you can now specify address directly, instead of using the longitude and latitude. Please refer to here for more details.
v1.0.10 (for Joomla 1.0) and v1.5.10 (for Joomla 1.5)
Released Jun 1, 2009
v1.0.12 (for Joomla 1.0) and v1.5.12 (for Joomla 1.5)
Released October 24, 2009
This is in response to Chris's post titled "Re:googleDirections - To Here -- error".
"$add_p undefined" has been fixed.
v1.0.13 (for Joomla 1.0) and v1.5.13 (for Joomla 1.5)
Released February 27, 2010
This is in response to Andrew's post titled "Re:Undesirable lines of code".
The 2 lines of warning messages "$add_p undefined" have been fixed.
v1.6 (for Joomla 1.6)
Released Feb 23, 2011
Native version of the googleMaps plugin for Joomla 1.6!
v1.7.14 (for Joomla 1.7)
Released October 10, 2011
Native version of the googleMaps plugin for Joomla 1.7!
Also, support for PHP v5.3.8 for both Joomla 1.6 and Joomla 1.7.
v1.0.15 (for Joomla 1.0), v1.5.15 (for Joomla 1.5), v1.6.15 (for Joomla 1.6), v1.7.15 (for Joomla 1.7)
Released Nov 15, 2011
Now uses Google Maps API v3!
Key advantages in Google Maps API v3 includes:
Built-in street view!
You no longer require the Google API Key - what this means is that you can now access the google maps from your local machine!
v1.0.16 (for Joomla 1.0), v1.5.16 (for Joomla 1.5), v1.6.16 (for Joomla 1.6), v1.7.16 (for Joomla 1.7)
Released Dec 24, 2011
New features:
Support for googleDirections multiple stopovers!
If no label is specified, will use addr or latlng as marker
Improved function for displaying marker
kml can now show marker too
Allow user to input addr as "37.4219720, -122.0841430"
v1.0.17 (for Joomla 1.0), v1.5.17 (for Joomla 1.5), v1.6.17 (for Joomla 1.6), v1.7.17 (for Joomla 1.7)
Released Jan 03, 2012
Thanks to feedback from Florian who found out that the reverse geocode lookup by Google sometimes do not gives the right mapping. Have modified the code so that the googleMaps plugin now maps the exact location when latitude/longitude is given.
This is a content plugin. As the name suggests, a content plugin is for use specifically within a Joomla article, which is managed by the com_content component.
Usually, a content plugin will not run in other components (it's originally designed to run within com_content only).
However, if you really want to a content plugin within other components, you may still achieve this by adding a trigger in your component.
You can find some documentation here: Supporting plugins in your component http://docs.joomla.org/Supporting_plugins_in_your_component
Not too sure about this. You might need to check at Google's forum or do a search on the internet about this.
If it can, you have to change the code yourself, because I designed this plugin as a lightweight plugin - something light and simple to use.
There are many other very powerful but more complicated googleMaps plugins in joomla.org. You may want to take a look at those if this feature is what you need.
Is there any way to have the pinkish border show around a jurisdiction like it does if I search in google maps? I've looked on the google api site and haven't seen anything.
I install the googleDirections - To Here, but the Google Maps balloon (infowindow)text color is #fff and the bg too, so how can I change the text color. Regards, Albano
I tried to insert 4 different maps in an article with 2 rows and 2 columns configuration. Using this plugin {} one after another, I got 4 different maps. But the maps layout is 4 rows x 1 col. How can I make it 2 rows x 2 columns?
No, I still got 2 rows 1 col. Pls see code below. but.. read further down
Two cities two columns:
{googleMaps width=300 height=300 addr="585 High Street, Penrith, NSW, Australia"} {googleMaps addr="97 Victoria Ave, Chatswood, NSW, Australia"}
... but when I inserted another line; before the , the 2 maps displayed as 1 row 2 cols. That's good. BUT the problem is the maps are displayed BELOW the footer. It should be within the article. Thanks.
not working.... plugins are enabled. I put the macro piece of code into an html module, and it's not being converted into a map with directions. It's just the macro code.
basically works fine on http://www.urlaub-online-buchen.org/joomla/index.php/staedtereise/frankreich.html but takes a very long time to load. any idea why???
the plugin work fine for the first googleMap, but when insert the second in the same article (I use tab and slider to separate 1st and second location) the first map became incomplete, only partial of the map display.. required help, pls advice...
Any way to control the color of the text on the pop up display? If the Joomla template css file calls for white text on a black background, it affects the color of the text on the pop up in the googleMaps display. Can a separate css file control that function?
Hi I received the order confirmation email after paying the USD10 via paypal, but after that it was a 404 not found and I was not re-directed to download the no-"power by" version. Please kindly help.
I am interested in duplicating the map with the colored polygons. Where is the info regarding how to do that? Can the colored area be set to my choice or does it follow something in the google map? I want to create a radius around a certain area. Thanks
Hi, first of all, congratulations on a great plugin!! I am having trouble with and adress that does not seem to display correctly on the plug in. The place is already googable, its calles Zataaj and it is in dubai. Here is a link:
All Joomla plugins are using the google maps API. Naturally the API version will not be as "powerful" and smart as google's own Google Map - because they don't release all their functions in their API.
For your case, there are 2 solutions,
1) For the API or plugin, you need to put in more detailed address. I'm sure your company address is more than just "Zataaj, Dubai". So try put in the complete address and see if it works.
2) If it still doesn't work, the most accurate is actually using the latitude and longitude of your address. If you do not know what's the latitude and longitude for the address "Zataaj, Dubai", you can use the free Google Geocoder v2.0 that I've written: http://www.kksou.com/php-gtk2/google-geocoder-v2/ Simply enter your address and click "Get Geocode". I tried it and it says: latitude: 25.271139 longitude: 55.307485
Comments
Thanks
?????
Dissertation writers
Usually, a content plugin will not run in other components (it's originally designed to run within com_content only).
However, if you really want to a content plugin within other components, you may still achieve this by adding a trigger in your component.
You can find some documentation here: Supporting plugins in your component
http://docs.joomla.org/Supporting_plugins_in_your_component
Regards,
/kksou
Not too sure about this. You might need to check at Google's forum or do a search on the internet about this.
If it can, you have to change the code yourself, because I designed this plugin as a lightweight plugin - something light and simple to use.
There are many other very powerful but more complicated googleMaps plugins in joomla.org. You may want to take a look at those if this feature is what you need.
Regards,
/kksou
This is controlled by google's API. It's not controlled by me.
Please look up google website on its rendering of KML file and see if there's any option to control that.
Regards,
/kksou
Really sorry for the late reply. Not sure if you have found the solution.
Don't think Google Maps API provide such a function. You might be able to achieve this via CSS.
Regards,
/kksou
I install the googleDirection s - To Here, but the Google Maps balloon (infowindow)tex t color is #fff and the bg too, so how can I change the text color.
Regards,
Albano
How can I make it 2 rows x 2 columns?
Try to use HTML mode and then use standard HTML Table/TR/TD tags to insert table.
Within each TD, place the googleMaps tag.
Please give it a try and let me know if it works.
Regards,
/kksou
Two cities two columns:
{googleMaps width=300 height=300 addr="585 High Street, Penrith, NSW, Australia"}
{googleMaps addr="97 Victoria Ave, Chatswood, NSW, Australia"}
... but when I inserted another line;
before the , the 2 maps displayed as 1 row 2 cols. That's good. BUT the problem is the maps are displayed BELOW the footer. It should be within the article.
Thanks.
Can you please show the code again with the HTML codes.
Please use square bracket [ ] so that the code remains.
Regards,
/kksou
openInfoWindow( )
Please refer to the article:
googleDirections plugin Tutorial 08: Specifying Stopover Points
You can use the "stopover" tag to specify the points you want the route to pass through.
Is this what you have in mind?
Regards,
/kksou
I guess i can use this option along with the "nostop" function as well. On google maps itself it gives you other suggested routes as alternatives.
Thanks for your help
Now I get what you mean.
The one you see direct on google maps provided by google.com is an interactive one. So they give you alternative routes right there.
The one we use in the plugin is using the Google Maps API. Of course it's not as powerful as the one from google.com itself and it's not interactive.
Regards,
/kksou
thanks for your help. I have now got the directions sorted from your suggestion.
Many thanks
any idea why???
Cheers,
Ed
Where is the info regarding how to do that?
Can the colored area be set to my choice or does it follow something in the google map?
I want to create a radius around a certain area.
Thanks
https://maps.google.ae/maps?hl=en&q=zataaj&bav=on.2,or.r_cp.r_qf.&bvm=bv.46751780,d.Yms&biw=1344&bih=746&wrapid=tlif136897153447710&um=1&ie=UTF-8&sa=N&tab=wl
when I try to use the next line, it does not work:
{googleMaps addr="Zataaj, Dubai"}
How am I supposed to put the adress so it displays fine? Thanks you very much!!
All Joomla plugins are using the google maps API. Naturally the API version will not be as "powerful" and smart as google's own Google Map - because they don't release all their functions in their API.
For your case, there are 2 solutions,
1) For the API or plugin, you need to put in more detailed address. I'm sure your company address is more than just "Zataaj, Dubai". So try put in the complete address and see if it works.
2) If it still doesn't work, the most accurate is actually using the latitude and longitude of your address. If you do not know what's the latitude and longitude for the address "Zataaj, Dubai", you can use the free Google Geocoder v2.0 that I've written: http://www.kksou.com/php-gtk2/google-geocoder-v2/
Simply enter your address and click "Get Geocode". I tried it and it says: latitude: 25.271139
longitude: 55.307485
Once you know the geocode, you can refer to the article: googleMaps plugin Tutorial 01: Getting Started
The article shows you how to display a map using latitude and longitude instead of address.
Please give it a try one more time and let me know if it works, ok?
Regards,
/kksou
Very nice work and thanks for this!!
I have one question: How can I align the map in the center of the article??
Thanks
You need to look into joomla.org and download a plugin that can allow you to embed HTML codes in your article.
Then with the plugin, you can now embed standard HTML tags such as [div align=center] or simply [center] to center the map.
Regards,
/kksou
RSS feed for comments to this post