-
AuthorPosts
-
June 30, 2016 at 12:22 pm #655231
In case you didn’t find it: This is what Basilis is talking about:
https://kriesi.at/support/topic/cant-get-google-maps-on-contact-page-to-show-up/#post-655214
- This reply was modified 8 years, 4 months ago by Magnolia.
June 30, 2016 at 12:36 pm #655234Hey!
Thanks for sharing the link!
That is “the sexiest” solution i could come up with modifying Basilis’ solution. Hopefully our devs will release an update soon.Regards,
YigitJuly 1, 2016 at 2:24 pm #655787same issue, want to be notified of replies
July 4, 2016 at 12:44 pm #656509Hi,
alright. Let’s hope Kriesi can find a solution for it soon.
Best regards,
AndyJuly 8, 2016 at 2:56 pm #658444The map is working well on my server
http://www.signospublicidad.com/websena
but after transferring it to my clients server it doesn’t work…. I did it with Duplicator.
… need help urgently
July 8, 2016 at 3:16 pm #658461hey !
I found a solution
just enough to change a file to solve this problem
firstly “/wp-content/themes/enfold/config-templatebuilder/avia-shortcodes” html-helper.class.php found in the folder and replace to following code
found this code :
$visibility = ""; if(!empty($subvalues['long']) || !empty($subvalues['lat']) ) $visibility = "av-visible";
replace this code:
$visibility = "av-visible";
the final version of the code:static function gmap_adress($element) { $defaults = array('address' => '', 'city' => '', 'country' => '', 'long' => '', 'lat' => ''); $subvalues = isset($element['shortcode_data']) ? $element['shortcode_data'] : array(); $values = array_merge($defaults, $subvalues); $visibility = "av-visible"; $output = ''; $output .= '<label class="av-gmap-field av-gmap-addres">'.__('Street address','avia_framework').' <input type="text" class="'.$element['class'].'" value="'.nl2br($values['address']).'" id="address" name="address"/></label>'; $output .= '<label class="av-gmap-field av-gmap-addres av_half av_first">'.__('City','avia_framework').' <input type="text" class="'.$element['class'].'" value="'.nl2br($values['city']).'" id="city" name="city"/></label>'; $output .= '<label class="av-gmap-field av-gmap-addres av_half">'.__('Country','avia_framework').' <input type="text" class="'.$element['class'].'" value="'.nl2br($values['country']).'" id="country" name="country"/></label>'; $class = 'button button-primary avia-js-google-coordinates av-google-fetch-button'.$element['class']; $output .= '<a href="#" class="'.$class.'" title="">'.__('Enter Address, then fetch coordinates','avia_framework').'</a>'; $output .= '<div class="av-gmap-coordinates">'; $output .= '<label class="av-gmap-field av_half av_first">'.__('Longitude','avia_framework').' <input type="text" class="'.$element['class'].'" value="'.nl2br($values['long']).'" id="long" name="long"/></label>'; $output .= '<label class="av-gmap-field av_half">'.__('Latitude','avia_framework').' <input type="text" class="'.$element['class'].'" value="'.nl2br($values['lat']).'" id="lat" name="lat"/></label>'; $output .= '</div>'; return $output; }
and paste following code enfold analytics code area
<!--Google Maps JavaScript API --> <script src="https://maps.googleapis.com/maps/api/js?key=XXX" type="text/javascript"></script>
“XXX is your api key google is free 25.000 views your map”
that is all automatic address detection code just does not work , but you can find it in the manual..
best regards.
- This reply was modified 8 years, 4 months ago by rdvnburton.
July 11, 2016 at 1:05 pm #659220Too much code for me… I’m still not brave enough to touch php.
Any news from Kriesi?July 11, 2016 at 3:05 pm #659315Hi,
he’s still working on it.
Thanks for being patient.
Best regards,
AndyJuly 11, 2016 at 3:12 pm #659321Same problem here, waiting for update?!
July 12, 2016 at 12:11 pm #659770Hi,
Sorry for the delay, we’re working on an update. Please bare with us in the meantime.
Regards,
RikardJuly 19, 2016 at 9:44 pm #662713Same issue. Map worked fine on the development site, moved to production and produced the following error message a split second after the map loads (then disappears):
This page was unable to display a Google Maps element. Please contact the site administrator. If you are the administrator of this site, please check the JavaScript console or check the following page for troubleshooting: http://g.co/mapsJSApiErrors
The console reads MissingKeyMapError
Really I’m just following this thread so that I can see when this issue is resolved…
July 21, 2016 at 10:42 pm #663618Hi, all. After tinkering around with this issue, I put together some code that let’s you add the Google API code via the Theme Options. The first function adds a field called “Google API Key” to the Theme Options tab. The second function pulls that value and uses it in the underlying HTML. Just copy these into the functions.php file for your theme or (hopefully) child theme.
Kriesi’s solution will probably be better in the long run but in case anyone is interested…
// add some theme options add_filter('avf_option_page_data_init', 'pwm_utilities_avf_option_page_data_init', 10, 1); function pwm_utilities_avf_option_page_data_init($avia_elements){ $new_elements[] = array( "slug" => "avia", "name" => __("Google API Key", 'avia_framework'), "desc" => __("", 'avia_framework'), "id" => "google_api_key", "type" => "text", "label" => __("", 'avia_framework')); $avia_elements = array_merge( $avia_elements, $new_elements ); return $avia_elements; } // add google maps api script with key (only if the key has been entered). add_action('wp_footer', 'gmaps_workaround'); function gmaps_workaround(){ $google_api_key = avia_get_option('google_api_key'); if( $google_api_key ): echo '<!--Google Maps JavaScript API -->'; echo '<script src="https://maps.googleapis.com/maps/api/js?key=' . $google_api_key . '" type="text/javascript"></script>'; endif; }
July 22, 2016 at 1:17 am #663637I’m truly surprised how long it takes best theme developers to fix issue which was announced way in advance by google.
As well as I’m surprized how long it takes to fix WPML compatibility issues when changing default language. Theme actually breaks and its listed on “known issues”, but no progress what so ever
July 23, 2016 at 5:35 am #664124Hi,
Kriesi is still working on a fix for the google map issue and it will be included on next patch of the theme. For now, we managed to fix the google maps on a few sites by doing the following solutions in these threads:
https://kriesi.at/support/topic/content-element-google-maps/#post-656399
https://kriesi.at/support/topic/enfold-google-maps-widget-not-working/#post-657900
https://kriesi.at/support/topic/solution-to-google-maps-key-issues/https://kriesi.at/support/topic/solution-to-google-maps-key-issues/If the solutions did not fix the issues on your end, please create a new thread with the url to the site plus the WordPress and FTP login credentials. We’ll check the issue there.
Best regards,
Ismael -
AuthorPosts
- The topic ‘Google Maps API error: MissingKeyMapError’ is closed to new replies.