Autopmtimize Incompatibility: Only top third of map is displayed
Thanks for the great plugin.
I've noticed recently that my global map is only showing the top third of the
map. The bottom two-thirds is grey.
I tried setting Click_to_load = "true" but this didn't resolve the problem.
I'm browsing with the latest version of Firefox.
I CAN get it to work if I reduce the map height to 480 pixels and only use
Google Chrome. But that's not really going to cut the mustard for my readers :)
I would be grateful for any help.
Neil
Original issue reported on code.google.com by [email protected] on 28 Dec 2014 at 9:35
Woops - I forgot to give the link:
http://blog.neilennis.com/index.php/map/
Original comment by [email protected] on 28 Dec 2014 at 9:55
I get Google's API key error message at that link. Since Google v3 works fine
with no API key, it may be easiest to remove it from the settings.
Original comment by [email protected] on 11 Jan 2015 at 8:26
- Changed state: Investigating
Thanks for the reply.
I've removed the API key and refreshed my browser cache but the problem
persists.
Original comment by [email protected] on 11 Jan 2015 at 9:43
It looks okay to me in Chrome, but I see the issue in Firefox. These kind of
things tend tend to happen to Google maps when they're initialized in a div
that is not yet visible. If you change the window you'll see it correct itself.
My best guess is that the autoptimize stuff is messing with the load timing.
I'm not sure if that's part of W3TC or not, but there may be options or
exceptions you can make to fix it. If you can exclude URLs that begin like
"http://blog.neilennis.com/?geo_mashup_content=render-map", that might work.
If you can pinpoint the incompatibility please report back, thanks!
Original comment by [email protected] on 11 Jan 2015 at 10:22
- Added labels: Type-Incompatibility
Thanks for the excellent advice.
I disabled the Autoptimize plugin and this fixed the problem.
When I enabled Autoptimze the problem recurred.
I'd appreciate some more advice to nail this down please.
You suggested excluding a URL. Autoptimize doesn't work like that. You can
only exclude JS or CSS.
Do I have to exclude all JS files in the geo-maship/js subdirectory, or is
there a specific JS file which does all the rendering which I could exclude?
Original comment by [email protected] on 11 Jan 2015 at 10:48
Problem solved :)
I added geo-mashup* to the exclude list, and that seems to have fixed the
problem.
Thank you!!!!!
Original comment by [email protected] on 11 Jan 2015 at 10:52
I spoke too soon.
This doesn't fix the issue.
I can only assume the wildcard is being ignored.
I'll try adding all the geo-mashup JS files to the exclude list and see if I
can resolve it.
Original comment by [email protected] on 11 Jan 2015 at 10:55
One other question - if there is someway to export the map to a static KML file
I'd be happy to do that instead of dynaically loading it. Is that possible?
Original comment by [email protected] on 11 Jan 2015 at 11:19
Another quick thing to try might be switching to OpenLayers or Leaflet.
For excluding files, start with geo-mashup-mxn.js. If dependencies are handled,
that might do it.
I don't have a KML export feature yet. You might experiment with caching the
map iframe HTML.
Original comment by [email protected] on 11 Jan 2015 at 11:54
- Changed title: Autopmtimize Incompatibility: Only top third of map is displayed
I found excluding the following from Autoptimize worked:
jquery.js, maps.google.com/maps/api/js, geo-mashup/js/geo-mashup-mxn.js, geo-mashup