Tagged: map
-
AuthorPosts
-
April 28, 2017 at 5:17 pm #784720
Hello,
We have a lot of markers on the map and would like to remove the animation in order to have the markers displayed instantly on the map.
Is there a code I can add to the child theme?
Thanks,Frederic
April 30, 2017 at 4:06 pm #785281Hey fred1601,
Could you please give us a link to your website, we need more context to be able to help you.
Best regards,
VictoriaMay 1, 2017 at 3:12 pm #785773Hello Victoria,
Please find below the link.
Thanks,Ferderic
May 1, 2017 at 5:13 pm #785853Hi,
Try to edit this file in the enfold theme: js/shortcodes.js
Find and remove this code (line 654 in Enfold version 4.0.5):animation: google.maps.Animation.BOUNCE,Let us know if that helps :)
Best regards,
NikkoMay 1, 2017 at 6:34 pm #785900Hello Nikko,
It did remove the bounce but in order to have all the markers displayed at load, I had to modify the following line:
setTimeout(function(){ marker.setAnimation(null); _self._infoWindow(_self.map, marker, _self.$data.marker[key]); },1);
},1 * (parseInt(key,10) + 1));However it works only if done in the shortcode.js of Enfold not on the child theme, which is a bit annoying as I will lose the changes at the next update.
Any option?
Thanks,Frederic
May 2, 2017 at 8:52 am #786223Hi Frederic,
Try creating a js folder in the child theme and put the modified shortcodes.js file there then in functions.php of the child theme, add this code:
// Replace shortcodes.js function change_shortcodesjs() { wp_dequeue_script( 'avia-shortcodes' ); wp_enqueue_script( 'avia-shortcodes-child', get_stylesheet_directory_uri().'/js/shortcodes.js', array('jquery'), 2, true ); } add_action( 'wp_enqueue_scripts', 'change_shortcodesjs', 100 );Hope this helps :)
Best regards,
NikkoMay 2, 2017 at 7:37 pm #786646Hello Nikko,
It works! Thanks a lot!
Best Regards,
Frederic
May 2, 2017 at 8:09 pm #786655Hi,
Happy we could solve it.
Please feel free to let us know if there is anything else we can help you out with.Thank you
Best regards,
Basilis -
AuthorPosts
- The topic ‘Remove map marker animation’ is closed to new replies.
