cancel
Showing results for 
Search instead for 
Did you mean: 

Google Maps API MissingKeyMapError via Magento Plugin

Google Maps API MissingKeyMapError via Magento Plugin

Hi everyone,

 

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. I've already contacted the creator of the plugin (over 2 weeks ago), but have not had a response.

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