Our support team is on holiday from January 1st to 7th. Responses may be delayed, but we'll be back on January 8th. Happy Holidays!

Okay
  Public Ticket #2286844
Google Map API call
Closed

Comments

  • boblibob started the conversation

    I use "Contact Split Screen" with the Google map and have restricted it to only that specific page.

    But now it looks like its a API call for the map on every page on the site. I get an error for those pages thats restricted not to use my map.

    Isn't that unnecessary to call the map API on all pages? Does it cost me API calls?

    Thanks!

  •  675
    Neuron replied

    Hi,

    As far as I know it calculates when the map loads not the api call on this case map doesn't load. I'm not very sure about this one, since we use ours and it never comes for billing, since we use a static map and we have over 100,000 map loadings free on month(you should have the same).

    - https://manifesto.co.uk/google-maps-api-pricing-changes/

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.

  • boblibob replied

    I'm not sure about this but it looks like this map script runs for every page since I get an error about unauthorized URL on all pages except the contact page I have authorized.

    Yes its probably no problem for map loads just a thought its unnecessary.

    I should look into this static map also.

    Thanks!

  •  675
    Neuron replied

    Hi,

    Well, there's a code which you can manipulate with it and change it to work only on the map page. If you're interested in that, feel free to do as following, don't worry that the update will crush it, I will change it to our plugin as well.

    You need to open functions.php of neuron core plugins.

    In line 31 you need to change from:

    wp_enqueue_script

    To

    wp_register_script

    https://prnt.sc/qvmvd3

    Then in neuron-core-bifrost > includes > widgets > advanced-google-maps > base.php, add the following snippet, I've also uploaded the file in case you don't want to make the change by yourself.

    https://prnt.sc/qvmy46

    public function get_script_depends() { 
        return [ 'neuron-google-maps' ]; 
    }

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.

  • boblibob replied

    It was too good :-)

    Now the map does not even show up on the contact page. But there are no map API calls on other pages.

    Thanks!

  •  675
    Neuron replied

    Hi,

    Does it works or not? Have you reverted the code or it works with that one?

    I am seeing the map in contact: https://prnt.sc/qxakr5

    Feel free to ask for anything you need.

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.

  • boblibob replied

    I took away the code so now the map shows.

    It does not work, it took away the map calls on all pages including on the contact page.

    Thanks!

  •  675
    Neuron replied

    Hi,

    I am sorry for the late reply.

    I added that on the upcoming update, it will be fixed on 2.0.5. I will let you know when the update comes.

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.

  • boblibob replied

    Have this been added to the update.
    I have not heard anything that there been any updates.

    Thanks!

  •  675
    Neuron replied

    Hi,

    Make sure to have Bifrost on version 2.1.0 and Neuron Core 2.1.0.

    https://envato.com/market-plugin/

    Kind Regards


    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.

  •  675

    Subscribe to our newsletter to get the latest updates about NeuronThemes and join our community Facebook Group.