Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • Helmuth Bederna 17 posts 78 karma points c-trib
    Feb 27, 2015 @ 08:46
    Helmuth Bederna
    0

    Google Maps Api Key

    Hi Jonathan!

    First of all I want to thank you for providing this amazing data type. I've used it now a lot and I really like it!

    Unfortunately I've been running into a problem recently where I get an 403 Forbidden by Google Maps API. After some research on the internet I found out that this error means I've exceeded the maximum API calls. I don't know why but well I can't do much about it. So I decided to get an API Key and put that Key into the initialization URL. Sadly I needed the recompile the project to get this job done.

    So it would be kind of cool to have an option to be able to configure an API Key. Maybe you can provide such a setting in the next version.

    Best regards, Helmuth

  • Jonathan Richards 288 posts 1734 karma points MVP
    Feb 27, 2015 @ 10:12
    Jonathan Richards
    100

    Hi Helmuth

    Thank you for compliment, and yeah, this would be a great feature to add.

     

     

     

  • Jonathan Richards 288 posts 1734 karma points MVP
    Feb 27, 2015 @ 12:24
    Jonathan Richards
    0

    Hi Helmuth,

    Have released a new version of AGM including something that might help you. But, sadly not the way I would have liked to implement it.

    I would have liked to have been able to add the configuration of the API key when you create the data type, but sadly this isn't practical. Google Maps V3 api can only be loaded once into Umbraco, this means that AGM can't properly work with other backend Google Map packages. This also means that at Umbraco backend initalization, the loading of the Google Maps is unaware of the configuration created in datatypes. To shift the initalization of Google Maps from global to property scope would create endless other problems.

     

    I have added a KEY value to the top of \App_Plugins\AngularGoogleMaps\1.0.4\controller.js
    this value will need to be maintained by you when upgrading to other versions or pushing code between environments. I'm guessing you can only use the key when used on Live, which might need you to remember this when pushing new code live.
    I can think of extra solutions, like only setting the key when the domain = 'www.mylivesite.com',


    Cheers
     

  • Helmuth Bederna 17 posts 78 karma points c-trib
    Feb 27, 2015 @ 12:51
    Helmuth Bederna
    0

    Wow! Amazing! That was fast. :D

    I'll give it a try and let you know.

    The solution though will help a lot. Because with offers the possibility to at least provide an API Key. Before it was compiled and you needed to download the source, change the controller.js, recompile and update the file on the server. Now you just need an editor and add the API key. It's much better.

    Thank you very much for the super fast solution!!

    Best regards, Helmuth

  • Helmuth Bederna 17 posts 78 karma points c-trib
    Mar 03, 2015 @ 09:06
    Helmuth Bederna
    1

    Hi Jonathan,

    finally I got time to test it and it works as expected. Thank you very much for the new feature.

    Best regards, Helmuth

Please Sign in or register to post replies

Write your reply to:

Draft