SimpleMap not showing map! HELP
-
Hi everybody!
It’s about 3 days that I’m going crazy installing on a website a store locator plugin, when it finally seems that I found a good one, it gives me a problem.
I’m talking about SimpleMap plugin, it can’t let me see the map in the page where I insert it, the searching form is ok but the box where there should be the map it’s empty.
Please help me!!!P.s: the API key is correct because it works with another plugin.
Thanks, Enrico
-
I don’t have wp-minify, and kinda at a loss here: :\
I’ve had similar response from the developer as well.
I’m afraid I can’t offer anything else – it was pure chance I found Minify to be the culprit – I was reviewing the page source and just thought things looked a little odd, traced it all back and it seemed like Minify was at fault. I was lucky, I think. Have you taken a look in the firebug console to see if you have any conflicts or errors?
It’s a real pity the developer isn’t more responsive because the plugin is great, but unless he ups his game I will be looking for alternative solutions, or just battle with the free version.
Related, I’m not sure, but within the plugin general settings in it states:
You have to many locations to auto-load them all. Only the closest 250 will be displayed if auto-load all is selected.
However I do not. I can’t remember if this was there before.
Steve, yours looks like it’s working now. I tried installing google libraries. No luck yet though. Check out https://enfieldtech.com/distributors/
Need some ideas here!
Turn off auto-locate using the IP address entirely. The service that is being used to perform that is down.
Thanks. I actually deactivated WP-Super Cache, and everything went back to normal.
I then installed Quick Cache which doesn’t interfere, is much easier to use, and seems to have just as good performance. Thanks all!
I fixed this with 2 steps.
I first noticed that the source HTML showed < p > tags within the simplemap javascript. You can condense the javascript located in the classes/simplemap.php file. Be sure to check your source file when this is complete for any extra tags.
The second issue what WPs converts of any & tags to #34; which affects some functions in the javascript generated by the PHP file.
To get around this, you can use [raw] [simplemap] [/raw] in your page.
Good Luck All!
I read though all the posts and have no idea why the map plugin is still not working on one site I am doing. The weird thing is I am using the same setup on a 2nd site (same template but different graphics, same plugins…) and the plugin is working on that site.
I went as far as to delete and setup the plug again and still no go. I also tried deactivating all other plugins and still no go. I also installed Use Google Libraries. I have [raw] [simplemap] [/raw] on both sites. The map does not even load locations even though it is set to display them all. (only have two listed in there now)
One site works but not the other. Any suggestions? I am at a loss as to why this is not working. Thanks!
I’ve had similar problems with my site as most of you are dealing with.
This solution is for anyone who is creating a custom theme from scratch and are using SimpleMap for searching locations. Might not work if you’re using a pre-configured theme.
1. Read the FAQ for the plugin first FAQ
2. If the Map does not show up but the search form does, pleasecheck your functions.php file, remove registered scripts that are not being used.
3. If you’re using a script.js file or your template files to call your javascript functions. Make sure all functions are being used in some template file, if not remove them.
4. In General options for SimpleMap under Map Configuration make sure you specify Map Page IDs. This setting makes sure that SimpleMap scripts load only for that page and recudes possibilities of scripts interfering with each other.
Enter the IDs of the pages/posts the map will appear on, separated by commas. The map scripts will only be loaded on those pages. Leave blank or enter 0 to load the scripts on all pages.5. If possible create a new template for just the pages where you’re using SimpleMap. This will help you spot javascript errors.
6. Google’s API V3 is being used in the latest release of SimpleMap. Google has specified the number of queries that you can perform with the API Google Limits. I would recommend all to use their own registered API key so you can keep track of the number of queries the API calls. API Key comes free with a google account. Sign Up for a API key.
7. Change your SimpleMap API key. Under Plugins >> Editor >> SimpleMap >> simplemap/classes/maps.php. Find the Code below
/** * Generates the actual iframe * * @since 1.0 */ function generate_iframe() { if ( ! empty( $_GET['sm_map_iframe'] ) ) { global $simple_map; $this->set_map_atts(); $atts = $this->map_atts; wp_enqueue_script('jquery'); ?> <html style='margin-top:0 !important;padding-top:0 !important;'> <head> <?php wp_head(); ?> <style type='text/css'>* { margin:0; padding:0; }</style> <script src="<?php echo esc_url( SIMPLEMAP_MAPS_JS_API . '?key=<em>your_key</em>&sensor=false&language=' . $atts['default_language'] . '®ion=' . $atts['default_country'] ); ?>" type="text/javascript"></script> </head> <body>
As we all are using the same API and google might be limiting our searches.
I would recommend backing up the plugin files before editing anything
I’ve used all these steps and the SimpleMap Plugin works like Magic!!
Forgot to mention.
For Step 7
Change the code below
<script src="<?php echo esc_url( SIMPLEMAP_MAPS_JS_API . '?key=YOUR_KEY&sensor=false&language=' . $atts['default_language'] . '®ion=' . $atts['default_country'] ); ?>" type="text/javascript"></script>
Place the key after ?key=
HOPE THIS HELPS!!
Thanks for the help kmenon. I greatly appreciate it. I went though your suggestions and still no go.
The odd thing is if I set the map to “No auto-load” the map shows up. If I do a search for a location the map disappears and it says “loading”. If I have the map set to “Auto-load search results” or “Auto-load all” the map does not show up at all but just says loading and no locations appear under the map. Once in awhile when i refresh the map looks like it starts to load for about 1 second then just goes to loading. I am at such a loss I am about to tell my client I am just going to axe the plugin. The stupid thing is it works with the same theme on a separate site with all the same settings and plugins.
Hi spurge13
I have the same problem as you, did you find any solution on this?
Tried out the plugin on various installations without any problems.
But the site I’m suggesting the plugin for does not render the map.I receive an js error
google is not defined
geocoder = new google.maps.Geocoder();Did you find any solution on this?
Been diging in to this problem and found a “solution”.
The google API library didn’t load at all, I tried to locate if there was a conflict with any other js callbacks. But non found.
Found out that If changed back to the twentyeleven theme everything worked out as it should. Started over from there and copied file by file to the twentyeleven theme from my custom theme and realised that it was the header file from my custom theme that started the conflict.Copied all the code from the custom theme header.php and pasted it in to the twentyeleven header.php file and that worked out fantastic!
Don’t ask me why this worked, the formating of the files was the same and everything else was the same. Now it works with the same code but with a new file.
Good luck!
My solution was similar to pierrewiberg’s… I simply placed…
<script type='text/javascript' src='<?php bloginfo('url'); ?>?simplemap-master-js=1&ver=3.4.1'></script>
…within my theme’s header and maps are working on interior pages now. Not that elegant, but hey, I’m on a time crunch here!
- The topic ‘SimpleMap not showing map! HELP’ is closed to new replies.