Simple Google Map
We just needed a little embedded google map on the contact page. Every other google maps plugin either had too many features, not enough features, or just plain didn’t work. So we made our own. And we thought we’d share it with you.
How it works
Google recently released version 3 of their Maps API. The short story is they made it smaller and faster, but with less features. The biggest advantage is that it doesn’t require an API key. So all you have to do is install this plugin and set a few options! Lucky you.
There are two ways to put a map on your site. One is with shortcode inserted into any page or post. The other is as a widget in your sidebar.
The shortcode name is SGM and here are the options..
- lat [int] – the latitude of the marker and the center of the map.
- lng [int] – the longitude of the marker and the center of the map.
- zoom [int] – the zoom level (0-19).
- type [int] – the starting map type. possible values are only ROADMAP, SATELLITE, HYBRID, or TERRAIN and must be in uppercase
- directionsto [string] – the destination address for getting directions. obviously you want this to be the address of your latitude longitude coordinates.
- content – what goes inside the infoWindow (speech bubble) that appears when the marker is clicked.
Sample example
So with this sample shortcode :
[SGM lat="28.022827" lng="-81.73127" zoom="14" type="TERRAIN" directionsto="62 4th St NW, Winter Haven, FL 33881" content="<b>Clark/Nikdel/Powell, Inc.</b><br>62 4th St NW, Winter Haven FL 33881<br>For directions enter your address below"]
..you would get something similar to this :
A few notes
- This plugin only allows for one map per page (a widget map counts as one) and one marker per map. It is simple, after all.
- The plugin inserts some CSS into your website’s <head> that is necessary for the map to appear so make sure your plugin has the wp_head() function in the header.php file. If nothing shows up when you insert a map, that is most likely the problem.
- You can edit or turn off the aforementioned CSS from the plugin’s settings page. Just make sure you at least define a width and height for div#SGM.
- The directions form is displayed only if you have the directionsto value set.
- One of the features google left out of Maps API V3 was the info bubble’s ability to resize itself. So its width and height are defined by the width and height of the map. Somehow..
- If you wish to use html in the content value in shortcode, be sure and type it in visual mode (not HTML mode). the pointy brackets will be special html characters in HTML mode and are converted back into pointy brackets by the plugin.

115 Comments
wow this is great! thank you very much!
Very usefull, thx lads.
Excellent plugin. Many thanks for your open source contribution.
I hate to turn this into a support forum as often happens when someone releases something that people can’t quite figure out, but are you prepared to offer advice as to why I can’t actually get anything to display in this div?
http://dynamicpilates.co.nz/contact/
(Feel free to contact me offline if you’re prepared but don’t want to do this over the comments…)
… sorry, really dumb copy&paste error whereby the line breaks in the address details above were in my HTML, causing a jscript error. Simple. Thanks, this is awesome!
I must be being dumb but I installed this plugin, added the CSS above and tried the above sample short code on a WordPress page and just getting a blank yellow edged box. Any as to what I might be doing wrong much appreciated :-( GG
Gulumbit, could you provide a link to your page?
I have the same comment as Gulumbit. Everything should be hooked up correctly, but I only get the yellow box. There is a javascript error on the page.
disregard my post. It was the extra breaks in the HTML. Thanks! This is great!!!!
What if I want this to be show in a widget? Any ideas?
Love the simplicity. Any chance of being able to have the marker and the centre set separately and specifying the default view (map/satellite etc)? A.
Hmm – and in Safari 4 on the Mac (not checked others) the directions form gets cropped. I think it might be a Google Maps API issue: There’s a div with an inline style that has a tight height set on it. A.
== Installation ==
1. Upload `SimpleGoogleMap.php` to the `/wp-content/plugins/` directory
2. Activate the plugin through the ‘Plugins’ menu in WordPress
3. Insert the shortcode into your posts or pages.
The installation instructions do not mention that one needs to copy and paste code into the CSS file. Perhaps i’m a newbie and didn’t realise that this is the case? That took me a few hours of head banging work out, never the less this is a great plugin, respect to the dev!
I’m having an issue with it using wordpress 2.8.4 – after installing it, all pages have this at the top (including the admin pages):
‘, $content); $return = ”
“; return $return; } ?>
Todd : Glad you could work it out!
Mcometa : Good idea. I’ll add that in the next update.
Andy Macaulay-Brook : Thanks for the ideas and heads up. I’ll add those/address the cropping problem in the next update.
Richard : Good point. I think since I’m a developer I built the plugin to cater to developers. I will add more user friendly features in the next update.
Nick : That is just plain bizarre. I’ll check my syntax, but if I can’t replicate that problem myself I don’t know what to tell you. But I’ll see what I can find.
Thanks to everyone for the feedback!
@Nick & @CNP: I’ve also encountered same problem. What I did was I changed the opening php tag to <?php (line #1). Try it, it worked for me and hope it does work for you too.
@All, I’ve found a way to make this to work on a sidebar/widget area. Just add this line of code to your “functions.php”
add_filter(‘widget_text’, ‘do_shortcode’);
Then copy and paste your shortcode to your Widget area. Try it. :)
Source:
http://englishmike.net/2008/07/07/wordpress-quick-tips-3adding-a-shortcode-to-a-sidebar-widget/
http://www.smashingmagazine.com/2009/02/02/mastering-wordpress-shortcodes/
Good luck! @CNP, thanks for the simple yet wonderful google map plugin.
Great Plugin…
Is there a way of getting the map to start in the hybrid mode?
Cheers
http://www.mirefootwebdesign.com
Nice plugin – thanks much.
I was initially having trouble getting the map to display. Eventually, I realized it was an apostrophe in the value of the content option that was causing an error. Dashes cause the same problem.
I am lost. Where is the css file?
Eldred : There isn’t as of now, but it is a feature we will be including in the next update
Laura : Thanks for the heads up. That will be fixed in the next update as well.
Tony : Currently the plugin isn’t very friendly to our friends without programming skills. That will also change in the next update.
Everyone : Hopefully the next update will come very soon. It will address everyone’s requests!
I finally got this plugin to work after getting some clues in the comments above.
Here my problems:
Couldn’t find a settings interface on WordPress. Found out, there’s none!
Didn’t know where to find the latitude and longitude of my map. Finally found it.
Got yellow box but no map. Found out, that apostrophes and dashes cause an error. Worked fine after removing these.
There are no option to get directions on the map. Would be nice to have this option.
My suggestion for a future release:
A simple copy and paste of the Google Code into a plugin app creates the shortcode that can be copied and pasted into the page.
Thanks!
Also, this plugin doesn’t work in IE. No problems in Firefox.
Everyone : Version 2.0 has been released! I hope you enjoy it and if there are any questions, comments, or suggestions they are much welcome.
Anja : There was no settings page, but there is now. I use this site to get latitude and longitude from an address (it’s the first hit on google if you search for “latitude and longitude from address”). Thank you for the note on apostrophes and dashes, that is now fixed. There was always a form to get directions in the info bubble (maybe you needed to scroll down to see it?), but now it only appears when the directionsto value is defined. A shortcode generator is a good idea, I will consider that for the next update. I have tested the plugin in IE 6, 7, and 8 and all my tests were successful. If updating to version 2.0 does not solve your IE problem, please supply a link to your site that has the problem and I’ll take a look at it for you.
Hi
I tried placing the map at my about page using a shortcode but it didnt work. Widget seems to be OK. What could go wrong?
http://www.zubirjamal.com/about
Zubir : That is peculiar. I see “[SGM]” appearing on your page and all by itself in the source code. That makes me think wordpress is having issues parsing the shortcode. Have you made any changes to the core WordPress files? I see you are running WordPress 2.8.4, maybe upgrading to 2.8.5 could help?
Hi
I just discovered your plugin.
I was wondering if some developer would soon create a google maps version 3 plugin and you did it! I think I’ll like it.
Yet, I have one question: will you add the possibility to use an address instead of lat and lng inside the shortcode?
Thank you
Raphael
I haven’t looked far enough into V3 to know if it will translate an address into latitude and longitude. I will look into it for the next release. If it doesn’t, there was a suggestion of having a shortcode generator in the admin page. That would also prevent everyone from having to look up the latitude and longitude.
Hi
Thanks for the reply.
In the Services part of the Maps API V3 Developer Guide, it is about geocoding requests. I guess it should be possible to convert an address into latitude and longitude.
Awesome! Thanks for the heads up.
Great plugin, thanks. Only thing is the marker (or pin) on my map appears as a plain white rectangle. Actually when the page loads the correct pin graphic briefly appears but is quickly replaced by the white rectangle. Any ideas?
Thanks
I fixed the disappearing icon by adding a google custom icon
SO I’ve read all the posts and everyone tells you they have fixed their issues without telling you how!
Dowlnloaded the latest version and the plugin installed fine. Map displays ok (ie no yellow box) as a widget. However I want to change the width and height of the widget. At the moment it is tall and thin.
I can find no settings panel that lets me do this, and despite being an experienced developer (bit new to wordpress) i remain unclear as to where to go to change the css around this.
So could someone please tell me how to change the CSS for the widget version. In simple steps for someone as stupid as me but that might be then useful for others reading this post later!
I have cut and pasted your example and all I get is the string itself appear. The plugin is activated. The head function is there. Stumped.
Alan : Very strange, I’m glad you were able to find a solution, what to do there escapes me.
Marco : In version 2.0 I added the ability to edit the CSS. Go to Settings > Simple Google Map, click the checkbox next to “I want to edit the Simple Google Map CSS”, and text box will drop down with the CSS in it. Edit the CSS, click Save Changes, and refresh your front-end page. This CSS applies to both widget maps and maps inserted into posts/pages with the shortcode.
IanF : Strange. That makes me think WordPress is having issues parsing the shortcode. Are you running the latest version of WordPress? Have you made any changes to the core WordPress files? Also, do you have a link you could share? Don’t know if I might see anything from your source code.
Hi. Thanks for the plugin – it’s very simple to use and is just what I was looking for. I have the same problem as Alan above – the pin icon is missing. Take a look at this page
http://www.free-city-guides.com/bath/the-roman-baths/
I don’t understand Alan’s solution I’m afraid either – can anyone help?
Cheers
Andy : Try using the exact same SGM shortcode on another (preferably fresh) install of WordPress. I’m wondering if the CSS for your site is somehow effecting the marker. If you don’t have one, paste the shortcode here and I’ll test it.
Testing the plugin and the pointer doesn’t display.
Using the Atahualpha theme – not sure if this is conflicting.
Otherwise, great plugin!
Hi again. Here’s the SGM code I’m using…
[SGM lat="51.3813894" lng="-2.3598293" zoom="15" type="ROADMAP" content="The Roman BathsAbbey Church Yard, Bath, BA1 1LZ"]
I’ve tried this on a new page too and it does the same. I’m using WordPress 2.8.5 and I’ve only just updated to this version before installing the plugin. I’m not sure what you mean about a new install of WordPress? Thanks for your help!
Hi,
I got mine working now. It was due to the theme that i used.
Great plugin!
Thank you for your sharing your work. Works great for me with Chrome, but does not display map in IE or FF. I have tried everything. I even removed the parsing error from the in the content var but no map. Any suggestions?
Rick, Andy, & Damon : your problems reside in your CSS files. The easiest way to add the styles I give you below would probably be in the SGM admin page. In your WordPress admin drop down the Settings menu and go to the Simple Google Maps page. Check the checkbox “I want to edit the Simple Google Map CSS” and paste the CSS I give you below in the box that appears. Click save changes and see if your problem is resolved. Then come back here and let me know if it worked!
Rick & Andy : It looks as though you got your themes from the same place. To fix your problems add the following CSS :
#SGM img {padding:0; border:0; background-color:transparent;}Damon : To fix your problem add the following CSS :
#SGM img{max-width:none;}Zubir : Glad you could get it to work!
I like the feel and look of the widget. Good job. The only tweak I would like is the option to set the height of the widget different from the display size in the post and some control over the size of the content box.
Thanks for a great plugin. I keep tinkering under the hood.
Kirby
Is there a way to get my content to show up without clicking my marker?
Hi. It works! Here’s a link to prove it!
http://www.free-city-guides.com/bath/bath-assembly-rooms/
Thanks for all your guidance and a great plugin!
Hi
I found the way to create maps with your plugin using directly an address in the shortcode.
I could take a bit of code from another plugin: Google Maps Geocoder. It uses the version 2 of Google Maps so there is a need for an API key. But only for the geocoding, not for the creation of the map.
Tell me the best way to give you the code I added, if you want it.
Raphael
Yes, thank you for the clear directions. Worked like a charm!
To make CSS changes persist on reactivation:
admin_sidebar->plugins->SGM_edit
replace line:
–#SGM input.text {border:solid 1px #ccc; background-color:#fff; padding:2px;}
with:
++#SGM input.text {border:solid 1px #ccc; background-color:#fff; padding:2px;}
#SGM img{max-width:none;}
(or whatever #SGM line you are adding )
Thanks again!
Very cool.. nice work.
Kirby : Setting custom map-specific heights sounds reasonable. If by content box you are referring to the info bubble that appears when the marker is clicked, please refer to the second bullet under Additional Notes in the plugin’s readme or the fifth bullet under A Few Notes on this page. The bubble’s size is determined by the size of the map.
Tom : Meaning getting the info bubble to appear as soon as the page loads? I’m not sure, I can look into Google’s API to see if that is supported in this version 3 beta.
Andy : Awesome! You are most welcome.
Raphael : If the geocoding requires an API key for each domain, then I do not wish to add it to the plugin. My goal with this plugin was to keep everything simple, the exclusion of obtaining an API key being the foundation of that simplicity. Thank you for the offer, however, and I’m glad you were able to find a desirable solution for your site.
Damon : Great! I’m glad I could help. And I think on the next release of the plugin I’m going to prevent the plugin from resetting the CSS upon deactivation so no one has to re-enter it upon reactivation. Thanks for the note.
blis : Thanks!
Hello,
Thanks for the plugin! It works fine for me on WordPress 2.8.5. It does not work on WordPress MU 2.8.5. (I tried it it on a vanilla WPMU install, with no other plugins, using default theme).
Any ideas?
Thanks!
RE: previous comment
I used visual mode as recommended above. I think at some point (perhaps a line wrap), the formatting kicks in and messes up the shortcode. I used HTML mode and had no problems.
Perhaps the WP vs. WPMU difference was triggered by the formatting in one and not in the other…
I’ve never used WPMU, so I haven’t tested it in that installation. I’m glad you got it to work, though!
works great! THX!
Hey, nice plugin.
Unfortunately, it is too simple for my requirements.
Another plugin that works very nicely is MapPress, which features same page driving directions, multiple locations, and multiple maps!
Oh hey, and this site is awesome! Very nice site! Love the style and design, and your portfolio is stunning.
:)
Using it for a client web site. I’m a copy writer by trade and was able to use your plug in with ease. Cheers. Much appreciated.
Thanks to everyone for the kind notes. I’m so glad the plugin is helpful to all of you.
Poe Jea : All of those great features available in MapPress are made possible because of the Google Maps API key required for that plugin. The purpose of this plugin was to provide a simple alternative for those who wish to show a map without all the bells and whistles and the complex settings that go along with them. Thank you for the note on our work!
Fabulous plug-in. True to it’s name. Simple? Indeed!
Thanks for making it easy!!!
I’ll definitely watch for more plug-ins and such from CNP.
Hello,
Will this plug-in work in WordPress 2.8.6? If so, please do let me know.
Thanks!
Great plugin! Worked nice at this page. I was worried about the size of the map but I saw that it fit itself into the div. I used the #SGM div to put in new text coloring though, because it used my body text color which was white originally and didn’t show up against the bubble background. I’ll definitely this plugin on sites in the future.
Rene : Yes, it works in 2.8.6.
[...] Simple Google Map [...]
Hello,
I have seen the example of the plug-in and it looks great. Unfortunately, I can’t get it to work on my church’s website. I sure would appreciate any help you could offer in regards to getting this widget to display. It shows the box but no map. I am newbie to WordPress, but I have gotten other widgets to work though. Any help you can offer would be greatly appreciated. The website is http://www.harvest-fellowship.com/beta. It is a widget called Map on the sidebar.
Thanks,
Rene Amador Jr.
Got a problem under IE…
Using with artisteer.
Thank you for your help
Rene : Unfortunately the conflict cannot be entirely resolved. It has something to do with the jquery and/or the css on the page. There are a couple workarounds.
1) Make the map widget the default widget to slide down when the page loads. If your theme doesn’t have an admin option for that, go to /wp-content/themes/wpchurch/scripts.js and change this line :
jQuery("#sidebar .widget:nth-child(1)").children(".widgetcontent").slideDown("slow");to this :
jQuery("#sidebar .widget:nth-child(3)").children(".widgetcontent").slideDown("slow");2) Make the map widget display when the page loads in addition to the service times widget. Add the following css somewhere :
#sidebar .SGMwidget .widgetcontent {display:inherit;}You could put it at the bottom of your style.css file or use the Simple Google Maps admin page. Go to Settings > Simple Google Map and select the checkbox “I want to edit the Simple Google Map CSS”.
Bertrand : Could I have a link?
Thanks for looking into my problem. I will try the recommendations that you suggested. Thanks again for your time and effort! I appreciate it very much.
I tried your recommendations, #2 to be exact, and the widget worked! Thanks very much!
Nice plugin, but I have 2 problems with it. First, I can’t get it to work in pages and articles, only as a widget. The code shows up as plain text.
And I’m not sure how to change the info bubble font color, as it is white on white. Can anyone help me, please?
Thank you.
Thank you very much for this great plugin, my clients love this Google map stuff.
Greets
Dave
Thanks for this very “simple” to use plugin. When you create a google map with API v3, the ‘scrollwheel’ option is enabled by default. I didn’t want this behavior so I had to modify your code. What do you think about providing a way to control all possible options (scrollwheel, noclear, scaleControl, draggable, etc…)?
Alex : Do you have a link to an example of your problem?
Steph : I have not seen those features in v3, but now that I am aware of them, it is certainly possible they will appear in the next update of the plugin.
[...] new plugin, Simple Google Map, gives the possibility to add maps with the API version 3. Using a shortcode your insert in your [...]
Hi.
How do I get the Google directions to open in a new window? Not the simple map but the Google map with directions that you get once you enter your origin address into the callout.
Thanks.
Rachel
http://www.sustenance-studio.com/blog/map/
Hey, great plugin guys – respect!
How do I remove the scroll within the infoWindow?
Thanks in advance :)
How to chance the language of the map for something else?
i’d really like to put a border around this, preferably black, but i just can’t figure it out!
love the widget though. works great.
Hello,
I have been using your Plug-in and I have tested it in Safari and Firefox and it just works! Unfortunately, in IE8 and IE7, the Simple Google Map just displays a blank space. Below is the error that I receive in IE8:
Webpage error details
User Agent: Mozilla/4.0 (compatible; MSIE 8.0; Windows NT 5.1; Trident/4.0; InfoPath.2; .NET CLR 2.0.50727; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729)
Timestamp: Thu, 25 Feb 2010 03:50:40 UTC
Message: ‘style’ is null or not an object
Line: 2
Char: 13516
Code: 0
URI: http://ie7-js.googlecode.com/svn/version/2.0(beta3)/IE8.js
Any help that you can offer would be greatly appreciated!
Thanks!
Having trouble displaying map using ‘thematic’ theme. Works with other themes? Any suggestions? ‘thematic’ does have wp_head() function in the header.php file. Thanks in advance.
Rachel : You’ll need to modify the plugin files. On line 96 add
target=\"_blank\"to the form tag. This will be an option in the next release.Justin : You’d have to take that up with google. Their javascript that creates the map outputs a lot of inline styling. If you use firebug in firefox you’ll find the infoWindow div in the DOM tree here :
div#SGM > div > div > div > div.gmnoprint > div > div > div > div.infoWindow. The div containing div.infoWindow hasoverflow:auto;, a width, and a height set on it. Which you can’t override because it’s inline styling. In google maps’ API docs it says the infoWindow sizes itself according to the map’s size, so try making your simple google map bigger. You could also try adding negative margins to that div containing div.infoWindow or using javascript to modify the inline styles on it.Mark : I really have no idea, I’ve not looked into language support, but I will.
Boyd : Check out my comment to Marco farther up the page.
Rene : Your problem is with the IE8.js script. I understand its benefits (I used it myself for a couple sites), but sometimes it doesn’t play nice. I see you’re running version 2.0 beta 3. try updating it to the new IE9.js or going back to an earlier version.
Kevin : Check out my comment to Damon farther up the page.
Very neat plugin, works on WP2.9.2 too :)
Regarding language support, you don’t actualy need to do anything. The google API will present in the default language set in the browser.
If you use Fire Fox, you can test this by going to
edit -> preferences -> content
You can change the default browsing language there.
Thanks for sharing this, CNP
I also wanted the simple way to add map to one of my pages and your plugin does that indeed. Thanks for your work!
But my only problem was that it prints scripts in the middle of the page. So I just registered two javascripts in my theme function file and used wp_enqueue to load it. Now I have both scripts loading in the footer and a map without plugin.
Michael
Hi CNP
Thanks for making this plugin available. Love the simplicity. I’m trying to add the map to the sidebar of http://nicdale.com. THe site runs WP 2.9.2 and the theme is Thesis 1.7.
The map works fine when I add the widget to the sidebar. But…
I want to add additional contact details to the widget so have used a text widget and used the short code (your code to test) and additional text. When the text widget is displayed the string appears rather than the map.
I’ve read the other comments and tested solutions but had no joy. Appreciate your help.
I’ve pasted your example code into a text widget for the sidebar but the map does not display.
I don’t know if someone answered this yet, I had the same problem where the map wouldn’t show up in wp 2.9.2. The problem was the visual editor changing the shorcode, I would see the short code being displayed on the front page, the fix was to copy and paste the short code in html view not visual mode. Who ever mentioned this before thanks. This plugin will help big time.
Just wanted to say thank you as the plugin works beautifully (on 2.9.2) on the local club page that I’m helping out with.
I have installed the widget into my side bar but everything comes up without the map itself. I am new to all this and not familiar with how to do the wp-head thing you mention here?? Help!
Hi
I attched the widet and the map come up blank. Do I need to have the site registed to use google maps? The pin is there but the map is blank.
Hi,
Have a problem with the widget, the bubble for the content goes out of the frame so you can read it, also I wonder if I can adjust the size of the widget.
Thanks
Hi again,
Also something else happened the layout flips out, if you go to http://kajgatan34.anweb-design.se/ and have a look over the google map is Veckans and that should go together with tabs and everytime I put in your google widget it flips out, why?
greetings,
Awsome plugin. Works great.
I would like to have the info bubble with driving directions appear when the map loads, rather than require the user to click on the marker. A little way up the comments, you said you would look into the api to see if this could be done. If it’s possible, I sure would like to find the solution.
Thanks,
Michael
Hi Great plugin, is possible introducing 2 points??? thankxx
Hi,
So I am having the same difficulties as Rachel. I am very new to WP so I am going through a long learning curve now. I have tried your suggestions on this site but my info bubble still doesn’t show the text.
Here is my site: http://www.minkikimSI.com/contact
Any help would be great ’cause a simple google map is all I’m looking for. Thanks!!!
Couple questions:
How do I change the color of the Info Bubble Content text?
How do I make the Info Bubble Content dispaly on load?
Cheers
Edit:
[Solved] How do I change the color of the Info Bubble Content text?:
#SGM {color:#000; width:100%; height:300px;}
[Unsloved] How do I make the Info Bubble Content dispaly on load?
I had a hard time finding this plugin, but it’s the best for my needs. Great job.
My question: I have the map used in my widget as a very small map I would like to remove the “map type” button on the up right side, as it takes a lot of attention. Is there a way to do so?
Hi,
How can i get speech bubble always show up without clicking on it?
Thank you
Hi CNP!
Thank you very much for this plugin. Never saw so a simple Solution for integration of a Google Map before. Installed and map was up instantly! No dealing with API keys etc… just a metatag with coordinates and that’s it! Wonderfull!
Thanks!
John, Dwayne : Thanks for the info!
AxelYa : Yea I think I’m going to clean it all up in the next release.
Nic : That’s because WordPress’s text widget doesn’t process shortcode. Check out this article by Digging into WordPress.
Flick, Gärberbach : Thank you for the kind words.
Claire : I tried going to your url, but got a 404 error page. Could you give a working link to an example of your problem?
Mat : The pin shows up, but not the map? That is quite peculiar. No, this plugin does not require a Google Maps API key. If you provide a link to a page with your problem I might be able to find the problem.
Annika : Certainly. In the plugin’s options page (Settings > Simple Google Map) check the box next to “I want to edit the Simple Google Map CSS”. A textbox will appear in which you can edit the default CSS of the map div. And I’m afriad the link you provided gave me an error as though the site does not exist.
Michael, Antonio Prohias, cv tips : I will make this happen in the next release. Seems it is a popular request.
bit69 : I believe the Google Maps API Version 3 I am using which produces a map without an API key only allows one marker. But I’ll double check.
Minki : What are you putting inside the content variable in the shortcode? For example
[SGM lat="28.022827" lng="-81.73127" content="What do you have here? This appears in the info bubble"]maxibaut : I don’t know if the APIV3 will allow it, but I’ll check.
Hi,
To answer your last question, what I have written in the content variable is this : SGM lat=”40.769081″ lng=”-73.925461″
I had the bubble show text but now it’s gone. Only when I click and drag within the bubble, does it highlight the text.
I’m not sure what to do here CNP. Thanks!
Hi. Fantastic plugin. But like bit69 I’d also love the ability to have multiple points on the map. I hope you can add this functionality at some point.
Great simple plugin. Had issue with the content not showing up in the info bubble and I thought it was due to text being white but couldn’t figure out how to test my theory. However, Antonio Prohias solved my dilemma. I’m using the map in a sidebar and all is well now. Could you perhaps make default colors more user friendly? I also had to figure out how to change the background color of the input box. Other than those small issues (which only help me to learn more) this is an awesome little plugin. Thanks! aandmgarage.tk
I’m trying to edit the lat / long through myphpadmin panel..
a:3:{i:2;a:0:{}i:3;a:7:{s:5:”title”;s:0:”";s:3:”lat”;s:9:”45.4601″;s:3:”lng”;s:10:”-75.6244″;s:4:”zoom”;s:2:”10″;s:4:”type”;s:0:”";s:12:”directionsto”;s:0:”";s:7:”content”;s:0:”";}s:12:”_multiwidget”;i:1;}
does this look right? something about it is wrong, because the plugin dissapeared as soon as i modified the lat/long values.
I would like to put a map in my side widget, will this do that? Or does it only work on posts and pages?
I am struggling trying to get the map to show up. I get a blank box with the Google logo and terms of use but that is it. I’ve mucked with the css and changed themes but still nothing. My site is http://fandiamonds.com and the Contact Us link has the map. Any suggestions?
Minki : It sounds to me like the css from your theme is color the text white or a light color. Try being very specific with your CSS. Example: instead of
#SGM {color:black;}you would use#page #content #SGM {color:black;}. This, of course, depends on the classes and ids used in your HTML.Greg : That is correct. That’s what an array looks like in the database. You’re best bet is to use the plugin via a shortcode or the widget.
Beds for Dogs : This plugin also has a widget, yes. You’ll find it with all the other widgets in your blog under the Appearance menu item in the WordPress admin.
Hi,
Using the plug in and quite pleased.. my client wants me to change the marker to a custom marker… is this possible? I was hoping it was just a jpg that I replaced but no such luck…
Is there a possibility to hide the street view button and the drop down box to change the map type?
Thanks!
[...] the tiles soon. In the meantime, here’s the real location of our new office, thanks to the Single Google Map plugin for WordPress: function makeMap() { var latlng = new google.maps.LatLng(46.56914, 6.828271) var myOptions = { [...]
I installed the plug-in as a widget at the bottom of my page and all I see is the red location symbol in a grey box. I found the longitude and latitude for my city hall, and plugged it into the widget. What am I doing wrong?
Cool plugin and nice easy to use
The info bubble is somehow broken.
The left size is nice and rounded, the right size breaks in squares.
The arrow to the position also broken but the opposite way. The left size is broken in small squares and the right size is nice.
Is it google problem?
I love it. Simple and it works. Many thanks for this great job.
hello i have a little problem with the plugin.
i’shows but as a grey field.
i checked if the head function is in the template and it is.
i don’t now what whent wrong. can someone help me
Got an error trying to config the widget in WP 3.1.2 that invloved line #63 in simple-google-map.php, which looks like this:
if (!$SGMoptions['nostyle']) {
changing ‘nostyle’ to ‘content’ solved the issue; just thought I’d tip you off if you didn’t already know about it.
Cheers.
/E
Hi,
thanks for a great plugin. My map is here, at the left widget sidebar: http://bit.ly/lMowRH. It works great with FF and Chromo, but not in IE 7. How should I fix it in my case? Thanks in advance so much!