Google Maps API MissingKeyMapError via Magento Plugin
NickName:Letitia Ask DateTime:2016-08-30T13:05:14

Google Maps API MissingKeyMapError via Magento Plugin

I've had a look through the forum already, but can't seem to find an answer for my specific problem.

So, I've installed a third party 'store locator' plugin on my Magento store but I keep getting a js error message about MissingKeyMapError. I've already applied for an API key - but my problem is I'm not sure where in the code I should put this key.

API Key

I'm in Googlemap.php in the app folder for this particular plugin and I think it should go in here somewhere but not entirely sure.

This is what's contained in Googlemap.php:

class Clarion_Storelocator_Block_Adminhtml_Storelocator_Edit_Tab_Googlemap       extends Mage_Adminhtml_Block_Widget_Form
{
    protected function _prepareForm()
    {
        $model = Mage::registry('storelocator_data');

    $form = new Varien_Data_Form();
    $this->setForm($form);
    $fieldset = $form->addFieldset('form_General_Googlemap', array('legend'=>Mage::helper('clarion_storelocator')->__('Google Map')));

    $radiusConfigValue = Mage::getStoreConfig('clarion_storelocator_general_setting/clarion_storelocator_display_setting/default_radius');
    $fieldset->addField('radius', 'text', array(
      'label'     => Mage::helper('clarion_storelocator')->__('Radius'),
      'note'  => Mage::helper('clarion_storelocator')->__('Radius is in miles. If kept blank then default configured radius will be used (System > Configuration > Store Locator)'),
      'name'      => 'radius',
      'value'      => $radiusConfigValue,
    ));

    $fieldset->addField('latitude', 'text', array(
      'label'     => Mage::helper('clarion_storelocator')->__('Latitude'),
      'class'     => 'validate-number',
      'required'  => true,
      'name'      => 'latitude',
    ));

    $fieldset->addField('longitude', 'text', array(
      'label'     => Mage::helper('clarion_storelocator')->__('Longitude'),
      'class'     => 'validate-number',
      'required'  => true,
      'name'      => 'longitude',
    ));

    $zoomLevelConfigValue = Mage::getStoreConfig('clarion_storelocator_general_setting/clarion_storelocator_display_setting/zoom_level');
    $fieldset->addField('zoom_level', 'text', array(
      'label'     => Mage::helper('clarion_storelocator')->__('Zoom Level '),
      'note'  => Mage::helper('clarion_storelocator')->__('If kept blank then default configured zoom level will be used (System > Configuration > Store Locator)'),
      'name'      => 'zoom_level',
      'value'      => $zoomLevelConfigValue,
    ));

    $data = $model->getData();
    if(!empty($data)) {
        $form->setValues($data);
    }
   return parent::_prepareForm();
}
}**

Any help/suggestions would be much appreciated!

Thanks in advance, Letitia

Copyright Notice:Content Author:「Letitia」,Reproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/39219095/google-maps-api-missingkeymaperror-via-magento-plugin

More about “Google Maps API MissingKeyMapError via Magento Plugin” related questions

Google Maps API MissingKeyMapError via Magento Plugin

I've had a look through the forum already, but can't seem to find an answer for my specific problem. So, I've installed a third party 'store locator' plugin on my Magento store but I keep getting ...

Show Detail

ERROR: Google Maps API error: MissingKeyMapError

The following JavaScript error suddenly appeared: Google Maps API error: Google Maps API error: MissingKeyMapError

Show Detail

dburles meteor Google Maps API error: MissingKeyMapError

I am using this Meteor package, https://github.com/dburles/meteor-google-maps-react-example/blob/master/imports/lib/GoogleMap.js After solving my problem in Loading GoogleMaps, Google map for mete...

Show Detail

MissingKeyMapError when configuring Google Maps API

I am trying to configure the Google Maps API key on my website like this: <div class="rd-google-map"> <div class="border-bottom"></div> <div id="google-map"

Show Detail

Google Analytics DataChart: MissingKeyMapError

I am using Google Analytic's Embed API to view my website analytics from a 3rd party site. I am trying to visualize the geographic location of my viewers by city using the GEO chart option. Howev...

Show Detail

Google Maps API error: MissingKeyMapError, but i have a key

Google Maps API error: MissingKeyMapError, but I have an API key, and pass it to js. Why it doesn't work? <script src="https://maps.googleapis.com/maps/api/js?Key=MY_API_KEY&callback=myMap"...

Show Detail

google is not defined or Google Maps API error: MissingKeyMapError

I'm writing component with ng-map inside and I'm following this tutorial. <div class="content-pane" map-lazy-load="https://maps.google.com/maps/api/js" map-lazy-load-params="{{$ctrl.googleMapsU...

Show Detail

Google Maps API error: MissingKeyMapError on another domain

The number of the problem related questions is huge. I spent a lot of time and probably took a look on each of them, however I haven’t found a solution for my case. There is a domain (let's call it

Show Detail

MissingKeyMapError: Error while using Google Maps Autocomplete text box on local host

I am trying the below code for implementing Google Maps Autocomplete text box in HTML HTML: <head> ... <script src="https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false&

Show Detail

Angular Meteor Socially Tutorial - Google Maps not loading - MissingKeyMapError

I am getting this error when trying to load google maps Google Maps API error: MissingKeyMapError I am accessing the application on my localhost http://localhost:3000/ After googling I noticed ...

Show Detail