Tagged: google map, hooks, info window, JS, php
- This topic has 5 replies, 2 voices, and was last updated 4 years, 2 months ago by
imran789.
-
AuthorPosts
-
April 11, 2018 at 11:39 pm #57169
imran789
MemberHi,
New version is good, i really likes hooks in JS file, that’s really helpful. i’m facing one issue on filters let me show you.
1234567add_filter('gmw_cache_helper_enabled', function ($cache) {return false;}, 10, 1);add_filter('gmw_internal_cache_enabled', function ($cache) {return false;}, 10, 1);these 2 filters not working to disable cache on development time.
Can you please add filter on gmw.map.js under the line 912
GMW.apply_filters('gmw_make_own_marker_clicks', self, i);
Can you please add filter on gmw.map.js under the line 1094
12345678910var infoWindowObject = {content: '<div class="gmw-info-window standard map-' + this.id + ' ' + this.prefix + '">' + marker.iw_content + '</div>',maxWidth: 197,minWidth: 197};infoWindowObject = GMW.apply_filters('gmw_info_window_location_param', infoWindowObject);// generate new windowthis.active_info_window = new google.maps.InfoWindow(infoWindowObject);Attachments:
You must be logged in to view attached files.April 12, 2018 at 12:44 am #57176Eyal Fitoussi
MemberHi,
Thank you for pointing out the issue with the cache filters. Indeed, they execute to early to be filtered.
Regarding the filter for the marker click, what exactly do you need to do?
There is already a filter on line 713 that triggers on each marker being generated:
1marker_options = GMW.apply_filters( 'gmw_generate_marker_options', marker_options, options['id'], this );Can you use that?
April 12, 2018 at 1:24 am #57178imran789
MemberThat’s good for change the options for marker, but i want to add new click or hover something on marker. screenshot attached for better understand
Attachments:
You must be logged in to view attached files.April 16, 2018 at 12:03 am #57184imran789
MemberHi Eyal Fitoussi, When you lunch new version after solving cache issue???
April 20, 2018 at 3:05 pm #57207Eyal Fitoussi
MemberHi,
I have just uploaded a new version 3.0.2.You can enable/disable the cache with the filter ‘gmw_internal_cache_enabled’.
I also added 2 filters to the JS files that you can use for your custom functions.
Let me know if this helps.
April 20, 2018 at 8:14 pm #57208imran789
MemberThanks that’s really helpful and works awesome 🙂
-
AuthorPosts
You must be logged in to reply to this topic.