Store Locator Plus® for WordPress › Forums › Premier Support › map jumps to gray after locations load
- This topic has 9 replies, 3 voices, and was last updated 6 years, 8 months ago by Jack.
-
AuthorPosts
-
April 11, 2018 at 1:32 PM #56465JackParticipant
After the update to 4.9.12 (I skipped the 4.9.11 release), upon initial load the map is centered and zoomed as desired. Once the locations load, and the loading_locations class is automatically removed from the div, the visible map jumps off screen showing the default gray Google Map background. I initially thought this was an issue with the AutoZoom function, but I have toggled that off and on and have seen no change in this behavior. I have also toggled the new “Loading Indicator” feature on and back off to see if this had any impact.
Thank you for your assistance.
Plugin Environment:
Store Locator Plus:4.9.12
Experience:4.9.11
Power:4.9.11
Premier:4.9.11
Extended Data Manager:4.7.0
Janitor:4.9Site URL:http://www.mscfisheries.org
This Info Cached:1523465226
Network Active:NoWordPress Version:4.9.5
PHP Version:5.6.33
MySQL Version:5.6.39PHP Limit:256M
WordPress General Limit:40M
WordPress Admin Limit:256M
PHP Peak RAM:34 MB
PHP Post Max Size:8MApril 11, 2018 at 2:05 PM #56466CiciKeymasterWe are having difficulty even getting that site to load. Your minify scripts are putting things in the wrong order and who knows what else. ALl scripts are in cache/minify and it is mangling the JavaScript when it builds the site.
See Troubleshooting about issues when javascript is messed up.
https://docs.storelocatorplus.com/blog/q-i-see-a-gray-map-or-blank-map-and-search-does-not-work/
April 11, 2018 at 2:35 PM #56467JackParticipantYes. To be clear, I tested with and without caching. I have disabled it for you.
April 11, 2018 at 3:14 PM #56468CiciKeymasterPlease attach your debug log or send it via email.
Something is causing Javascript errors. I still cant get that site to load.
The recent WP auto update to 4.9.5 created havoc with a lot of plugins so one of your plugins or scripts or your theme could be causing issues..
April 11, 2018 at 3:49 PM #56469JackParticipantMy debug log is empty. I forced an error by loading WP_DEBUG a second time just so that you could see debugging is enabled and logging is working. The only plugins loading are SLP. The theme is extremely minimal and only jQuery, the standard Google Maps API v3 libraries and the SLP js are loading. The load order is verified correct. Staging and production are in version control lock-step, but you are correct about the WP 4.9.5 update. My dev environment is still using SLP 4.9.10 and after verifying it is exhibiting the same jump to gray issue on location load since the WP 4.9.5 update. I will attach a screenshot of my full plugin environment for your review in a separate post as the “Add another file” function isn’t allowing me to.
- This reply was modified 6 years, 8 months ago by Jack.
April 11, 2018 at 3:50 PM #56470JackParticipantFull WP plugin list screenshot attached for verification.
Attachments:
You must be logged in to view attached files.April 11, 2018 at 4:05 PM #56473JackParticipantAlso, can you let me know what JS errors you are seeing? My developer console is clear in Chrome, Firefox, Edge, Safari and Opera and I would be interested to see what on my side might be causing you errors. Thanks.
April 12, 2018 at 11:00 AM #56476Lance ClevelandKeymasterThank you for removing the minify & cache — I can now see the source and dissect what is going on.
What is your map width/height set to under the SLP > Settings > Map?
You need to make sure you have a height and width that renders a div size that Google can read when their map lib loads.
If you set this to 0px 0px Google will not load the map tiles.
On *MOST* themes if you set it to 100% wide x 100% high it will also fail because most themes do not define a static vertical height for the inner content boxes on a theme. I usually tell people to start with something like 800px x 600px and see what happens. Then try 100% (wide) x 600px.
Google is fickle about that.
Not certain that is the problem — but it is a place to start.
April 12, 2018 at 11:09 AM #56477Lance ClevelandKeymasterActually — nevermind, that is not it.
The map renders from Google & SLP , it is when the server responds with all 950+ of your locations (not a great idea, but OK… that is going to hammer browsers and some phones will crash on that page).
Definitely needs more investigation — but there are no code errors coming back. It could just be Google running out of memory trying to render map markers for 950+ locations.
April 12, 2018 at 2:36 PM #56478JackParticipantLance, thanks for looking at it. The map actually loads and you can drag it to be visible (or scroll to zoom out until it is visible). It is just that when it loads the locations it jumps the map tiles offscreen so that only gray is visible. Strange behavior and obviously not your fault as it was working fine until the WP 4.9.5 update. I will be doing some tests between WP 4.9 and 4.9.5 to see if I can find what might be causing it.
-
AuthorPosts
- You must be logged in to reply to this topic.