Created
December 4, 2015 05:50
-
-
Save Fitoussi/b45e5476847dafb8de8c to your computer and use it in GitHub Desktop.
Gravity forms geolocation drag on click
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| drag_marker_onclick : function() { | |
| google.maps.event.addListener( GF_Geo.map.map, 'click', function( event ){ | |
| GF_Geo.map.marker.setPosition( event.latLng ); | |
| // save some map details | |
| GF_Geo.processing.status = true; | |
| GF_Geo.processing.element = 'map'; | |
| GF_Geo.processing.coords = { | |
| 'lat' : event.latLng.lat(), | |
| 'lng' : event.latLng.lng() | |
| }; | |
| // geocode coords and get address fields | |
| GF_Geo.geocoder( [ event.latLng.lat(), event.latLng.lng() ], GF_Geo.map_geocoder_success, false ); | |
| }); | |
| }, |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment