WordPress.org

Ready to get started?Download WordPress

Forums

Leaflet Maps Marker (Google Maps, OpenStreetMap, Bing Maps)
[resolved] Leaflet Maps Marker plugin support for Google Maps as basemaps at EdWeWo.com (25 posts)

  1. EdWeWo
    Member
    Posted 1 year ago #

    Hi Robert

    Thank you for creating one of the best WordPress plugins. I have just updated the Leaflet Maps Marker plugin to the latest version. Unfortunately the update has triggered the following issue on my website EdWeWo.com:

    " The Google Maps API server rejected your request. The "sensor" parameter specified in the request must be set to either "true" or "false". "

    If I disable the plugin the issue disappears. I suspect that the issue is related to the plugin's new feature:

    " support for Google Maps as basemaps "

    Your assistance in resolving this issue will be much appreciated.

    Thank you
    Dragan Lakic
    [ Signature moderated. ]

    http://wordpress.org/extend/plugins/leaflet-maps-marker/

  2. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Dragan,

    Thanks for your great feedback - this really motivates me to keep on improving my plugin :-)

    Concerning your sensor issue: I checked the code - the sensor parameter gets added to the google maps api url - if you look into the source code of mapsmarker.com you will see

    http://maps.google.com/maps/api/js?v=3.2&sensor=false&language=en&ver=3.4.1

    Strange thing is, that on your site only

    http://maps.google.com/maps/api/js

    Gets added to the source code.
    My guess is that another plugin could be interfering with how js gets added.
    So please try the following: disable all other plugins and check if the warning still shows up & the google maps api url is like on mapsmarker.com.
    If yes, please re-enable all plugins one by one to find the one which is causing the error & tell me this one please.

    If this doesnt help, please check with your webhoster if he uses any special configuration which could cause this behaviour,
    Regards

    Robert

    PS: it would be great if you could vote for my plugin on wordpress.org ;-)

  3. EdWeWo
    Member
    Posted 1 year ago #

    Hi Robert

    Thank you very much for your prompt reply. Your response has pointed to the right direction to resolve the issue.

    As per Google's Web Page Performance Audit, resources with a "?" in the URL are not cached by most proxy caching servers. To leverage proxy caching I have added the following lines to the theme's functions.php file:

    "
    // Remove the query string and encode the parameters into the URL
    function _remove_script_version( $src ){
    $parts = explode( '?', $src );
    return $parts[0];
    }
    add_filter( 'script_loader_src', '_remove_script_version', 15, 1 );
    add_filter( 'style_loader_src', '_remove_script_version', 15, 1 );
    "

    Removing the lines above resolves the issue.

    I would still like to leverage proxy caching for my website EdWeWo.com and your solution will be much appreciated. The solution could be a some kind of on/off switch for the plugin's new feature:

    " support for Google Maps as basemaps " ...

    Thank you
    Dragan Lakic
    [ Signature moderated. ]

    P.S. I have just placed my vote (# 3) for your plugin on wordpress.org - 3 people say it works!

  4. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Dragan,
    great you found a solution - will also try to find a way to make it work even for sites with proxy servers. Give me some time. If I dont find a solution, I will consider adding a switch to turn off the Google Maps integration.
    Regards,
    Robert

  5. EdWeWo
    Member
    Posted 1 year ago #

    Hi Robert

    Thank you very much for your prompt reply and for your great support. Even though it was Sunday here in Bulimba, Queensland, Australia, as well as in your part of the World, we have found the solution in only a couple of hours.

    Please let me know as soon as you find a solution to leverage the proxy caching for my website EdWeWo.com.

    Thank you
    Dragan Lakic

  6. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Dragan,
    you are welcome - feedback like your helps improving my plugin as I dont have the time and ressources to test every possible configuration.

    Unfortunately I still dont have a clue how to fix this issue - I did some research, posted a question on wpquestion.org - but with no success yet.

    One idea: could you please try installing other Google Maps plugins? As they will also have to embedd the script, I wonder if one of the plugin authors used another method to implement the script. If you find a plugin which uses the script and doesnt display the error message, please tell me and I will take a look into the sourcecode
    regards,
    Robert

  7. EdWeWo
    Member
    Posted 1 year ago #

    Hi Robert

    Thank you once again for your great support.

    I have tested all the WordPress Maps plugins and the 2 which are the best for the EdWeWo project are your plugin and MapPress Easy Google Maps plugin.

    Please have a look at the EdWeWo's FREE Semantic Maps below, which are utilising these 2 plugins:

    FREE Semantic Maps of Suburbs - Morningside, Queensland, Australia
    http://edwewo.com/suburbs/morningside-queensland-australia/

    FREE Semantic Maps of Best Brands in Queensland, Australia
    http://edwewo.com/best-brands/queensland-australia/

    FREE Semantic Maps of Brands Owners in Queensland, Australia
    http://edwewo.com/brands-owners/queensland-australia/

    The clue could be in the MapPress Easy Google Maps plugin, because it does not display the error message ...

    Thank you
    Dragan Lakic

  8. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Dragan,
    thanks for the info - I analyzed the plugin and found that it uses another method for loading the script needed from Google. Will include this method in v2.6 whoch will be released later this week,
    best regards,
    Robert

  9. EdWeWo
    Member
    Posted 1 year ago #

    Hi Robert

    That is great news! I will be more than happy to test the new release v2.6.

    Please let me know as soon as it is ready to test it on my website EdWeWo.com.

    Thank you
    Dragan Lakic

  10. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    Please download & test with the latest code on github - should solve your issue.

  11. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    The URL for github zip download is https://github.com/robertharm/Leaflet-Maps-Marker/zipball/dev (latest version) by the way

  12. EdWeWo
    Member
    Posted 1 year ago #

    Hi Robert

    Thank you for your quick reply and for your great coding. I have downloaded the latest code and will test it on EdWeWo.com tomorrow.

    Thank you
    Dragan Lakic

  13. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Dragan,
    I found a nasty bug - please re-download the package from github if you want to test before the official v2.6 release (which will be released hopefully today or tomorrow).
    regards,
    Robert

  14. EdWeWo
    Member
    Posted 1 year ago #

    Hi Robert

    Thank you for your information. I was so confident and that nasty bug did not stop me to test your latest code on my live website EdWeWo.com.

    So before I installed the latest code v2.6, I have deactivated the current code v2.5. The v2.6 was installed in a new folder and the following are my test results:

    1.
    Fatal error:
    Cannot redeclare class lmm_recent_marker_widget in wp-content/plugins/robertharm-Leaflet-Maps-Marker-d40356d/leaflet-maps-marker.php on line 1468

    which is this line:
    }//info: END class lmm_recent_marker_widget extends WP_Widget

    2.
    Recent marker widget error:
    The WordPress plugin Leaflet Maps Marker is inactive on this site and therefore this API link is not working.
    Please contact the site owner who can activate this plugin again.

    3.
    Default blue pin marker icon and the EdWeWo favicon marker icon (E*) were showing up on Marker Maps, but not on Layer Maps, even though a list of markers has been displayed under the Layer Maps.

    After my testing I have deactivated the v2.6 and uninstalled it. Unfortunately, all my markers and all my layers have disappeared with the v2.6 and now the EdWeWo.com is running without the Leaflet Maps Marker plugin.

    Please follow the links below to see how your plugin is really the missing piece on the EdWeWo.com pages:

    FREE Semantic Maps of Suburbs - Bulimba, Queensland, Australia
    http://edwewo.com/suburbs/bulimba-queensland-australia/

    FREE Semantic Maps of Best Brands in Australia
    http://edwewo.com/best-brands/

    FREE Semantic Maps of Brands Owners in Australia
    http://edwewo.com/brands-owners/

    It must be because of the Mercury in Retrograde … so I will wait for the official v2.6 release and then install all my markers and all my layers back on EdWeWo.com and also test the "sensor" issue.

    Thank you
    Dragan Lakic

  15. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    installing a plugin twice with only a different folder name will definitely result in those errors. As I will release v2.6 later this evening, I ask you to test with the official version. If the problem still exists, making v2.6.1 shouldnt be a problem ;-)

  16. EdWeWo
    Member
    Posted 1 year ago #

    Hi Robert

    Thank you for your reply. I just did not want to lose my markers and my layers on my live website EdWeWo.com.

    In addition, I had the same Layer Maps issue with the v2.4 and I had to switch back to default blue pin marker icon from the EdWeWo favicon marker icon E*.

    I am waiting for the official v2.6 release to install all my markers and all my layers back on EdWeWo.com and also to test the "sensor" issue.

    Thank you
    Dragan Lakic

  17. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Dragan,

    I will include import & export functionality in one of the next versions - so next time testing will be easier ;-)

    Concerning layer maps: they dont show the blue default marker pin but only the "layer center" icon - so I dont quite understand your issue.

    Ad v2.6: actually I wanted to make a release yesterday but had to postpone as I wanted to fix some minor bugs to save v2.6.1 ;-)
    Nethertheless - v2.6 will be a great improvement for Google Maps implementation as it uses tile servers instead of leaflet google plugin (reducing complexity as I am using standard leaflet code now and also more flexibility (languages are also considered for map labels etc.)
    Will release v2.6 this evening btw (hopefully ;-)
    regards,

    Robert

  18. EdWeWo
    Member
    Posted 1 year ago #

    Hi Robert

    That is a great improvement for testing! I did managed to export all my markers as CSV, KML and geoJSON file, but unfortunately there was no import functionality to restore them back. Could you please include import & export functionality for layers too?

    I agree, Layer Maps 'do not show the blue default marker pin but only the "layer center" icon', but only if you do not assign a marker to a layer. As I mentioned in issue No. 3, no marker was showing up on Layer Maps, even though markers were assigned to layers and a list of markers was displayed under the Layer Maps.

    That is a great improvement for Google Maps implementation! Do you plan to use tile servers for all the other Maps?

    I am patiently waiting for the official v2.6 release.

    Thank you
    Dragan Lakic

  19. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Dragan,
    if import- and export-functionality gets added, I will do this for marker and layer maps.
    Concerning issue. no 3: this is new to me - could I habe temporary admin access to take a look at this? might be a php configuration issue.
    Ad tile servers: unfortunately I have to revert Google maps integration via tile servers as this is not allowed by their terms of use. Nethertheless, Google Maps (terrain) will also be added.
    Generally I try to use tile servers where available to keep the code small and to reduce the need for js leaflet plugins.
    Ad v2.6: will definitely be released later this evening ;-)
    regards,
    Robert

  20. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    Hi again,
    just released v2.6 - should be available within the wordpress plugin repository at any moment...
    regards,
    Robert

  21. EdWeWo
    Member
    Posted 1 year ago #

    Hi Robert

    Thank you for your update regarding the import- and export-functionality.

    Thank you for your update regarding the tile servers. In addition, as per YSlow's Web Page Performance Audit, JavaScript files should be at bottom of the page. To improve a Web Page Performance it will be great if you could please make an option to put leaflet.js & gmaps-frontend.js in the footer? Also, could you please make an option to switch off gmaps-frontend.js if you are not using Google Maps?

    Thank you very much for the official v2.6 release!

    At the moment, I am in the process of reorganising pages of the EdWeWo.com website, but I have managed to install 3 new pages with 1 layer on each page and 2 markers on each layer.

    Please follow the links below to see my test results:

    The "sensor" issue resolved!
    The "sensor" issue has disappeared from the EdWeWo.com website:

    http://edwewo.com/

    Issue No. 3 resolved!
    The EdWeWo favicon marker icon E* is showing up on Marker Maps and on Layer Maps, and also a list of markers is displayed under the Layer Maps. There is no a php configuration issue:

    FREE Semantic Maps of Suburbs in Australia
    http://edwewo.com/suburbs/australia/

    FREE Semantic Maps of Best Brands in Australia
    http://edwewo.com/best-brands/australia/

    FREE Semantic Maps of Brands Owners in Australia
    http://edwewo.com/brands-owners/australia/

    Issue No. 1 & 2 resolved!
    Recent marker widget is showing up on the Blog Sidebar and on the Third Footer Area:

    EdWeWo.com Blog
    http://edwewo.com/blog/

    Hopefully during the weekend I will install all my markers and all my layers back on the EdWeWo.com.

    Thank you
    Dragan Lakic

    P.S. I have just placed my rating (5* # 40) and my vote (works # 2) for your plugin on wordpress.org!

  22. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Dragan,

    glad to hear that your issues are finally resolved :-)

    Ad placing js in the footer: I thought about this at the beginning of the plugin development but didnt do so due to considerations that maps wouldnt show up if site load took too long.
    Will check again to see if this is still true now and scripts can be placed in the footer.

    Removing gmaps-frontend.js if no Google Maps are used is unfortunately not possible by now. With bing maps js I check if the API key is present and if not, the bing js doesnt get added. With Google this is difficult, as no API key is required. So if I dont add the script for example if google maps are not selected for display in the layer controlbox, maps could still break if someone created google maps and then switched this off. I would have to add an extra option - this could be a solution - let me think about this again...
    kind regards,

    Robert

    PS: Thanks for your rating * vote :-)

  23. EdWeWo
    Member
    Posted 1 year ago #

    Hi Robert

    Thank you once again for you great support.

    Regarding the placement of the js' in the footer, the clue could be again in the MapPress Easy Google Maps plugin, because it loads its 2 js' after the </head> and <body>.

    In addition, please have a look at the following Google's Performance Best Practices:

    Defer parsing of JavaScript
    https://developers.google.com/speed/docs/best-practices/mobile#DeferParsingJS

    Defer loading of JavaScript
    https://developers.google.com/speed/docs/best-practices/payload#DeferLoadingJS

    Prefer asynchronous resources
    https://developers.google.com/speed/docs/best-practices/rtt#PreferAsyncResources

    Regarding the gmaps-frontend.js, I am reorganising all my maps on the EdWeWo.com to utilise the only 1 maps plugin - your plugin with 2 js'. That will reduce the number of DOM elements by 33% and also improve a Web Page Performance by 33%.

    Please have a look at the EdWeWo.com new contact page, which is now utilising your plugin with 5 different maps (1 OpenStreetMap and 4 types of Google Maps) presented all in one display:

    http://edwewo.com/contact

    By default all my maps are Google Maps now, but I will still use OpenStreetMap Maps to make "FREE 3D Maps" videos like the ones on the EdWeWo's YouTube Channel:

    http://www.youtube.com/user/EdWeWo

    Besides, to make Google's copyright box more visible and to meet the Terms of Use, may I suggest to put your copyright box a little bit higher on the Google Maps, just above the Google's copyright box. The clue could be again in the MapPress Easy Google Maps plugin, because it has "Powered by MapPress" box just above the Google's copyright box.

    Also, I wanted to utilise the multi layer-maps to install faster all my markers and all my layers back to the EdWeWo.com, but unfortunately displaying a list of markers under the map is not available on multi layer-maps. It will be great if you could please add a feature to display a list of markers under the multi layer-maps too!

    Finally, It will be really great if you could please add a feature for pop-up text to be visible by default on layer-maps too!

    Thank you
    Dragan Lakic

    P.S. I have just placed my vote (works # 2) for your v2.6.1 release on wordpress.org!

  24. RobertHarm
    Member
    Plugin Author

    Posted 1 year ago #

    Hi Dragan,
    thanks for your feedback - this helps further improving my plugin. Regarding your individual points:
    - placing static js like leaflet.js into the footer is not the problem. the challenge is the dynamic inline js which is created with every map and has to be loaded after satic scripts. I will see if I can find a solution for v2.7
    - Google credits: I am aware of the problem that my credits are hiding googles maps credits. Once leaflet 0.4 is out, I will use its new feature to move my credits to the bottom left corner for google maps only
    - multi-layer maps: displaying a list of all markers is tricky - this is why I didnt donit in first place. I will see if I find time to look into this matter again
    - open popups on layer maps: was not possible (at least easily) when I implemented this feature. If I find time, I will also check if this is still true with the current version
    best regards,
    Robert

  25. EdWeWo
    Member
    Posted 1 year ago #

    Hi Robert

    Thank you for your update.

    I look forward to your v2.7 release.

    Thank you
    Dragan Lakic

Topic Closed

This topic has been closed to new replies.