javascript - JS Call back not working -
1 Edit:
Added to plug in settings:
< CallBack Modal Open: 'Callback Model Close': Blank, 'Callback Reset': Blank, 'JasonPee Callback': Blank,In Plug-In Functions Added:
Var map = new google.maps.Map (document.getElementById (settings.mapDiv), myOptions); $ This.data ('map', map); // Custom reset callback google.maps.event.addListenerOnce (map, 'inactive', function) (if (settings.callbackReset) {settings.callbackReset.call (this, orig_lat, orig_lng, map, infowindow);}}); // Create an Infodov for filling infowindow = new google.maps.InfoWindow () later;
I am struggling to set a callback function to reset the map for the jQuery Store Locator. My code:
jQuery ('# map-container'). StoreLocator ({callbackReset: function (orig_lat, orig_lng, map, infowindow) {var origLatLng = new google.maps.LatLng (orig_lat), Orig_lng); Map.panTo (originLatLng); // center map $ ('# -link li'). RemoveClass ('List-Focus'); // remove list infowindow.close (); // Close Infowindow}});
In the code I have declared in the plugin:
'callbackReset': null,
and
// Custom reset callback google.maps.event.addListenerOnce (map, 'inactive', function) (if (settings.callbackReset) {settings.callbackReset.call (this, orig_lat, orig_lng, map , Infondo);}});
I'm calling it this way: jQuery ('# map-container'). StoreLocator ('callbackReset': true);
There is no error in the inspection, but not working. What am I doing during the function's announcement? I want to be able to make external calls to this reset in the plug, how do I get it? Thanks
Comments
Post a Comment