- Home >
- Documentation >
- data types >
- callback
callback
The callback function takes one parameter which is the result of the action asserted and depends on the request.
- marker will send a google.maps.Marker
- circle will send a google.maps.Circle
- getlatlng will send a google.maps.LatLng
- ...
In this example, you can see one another important feature of gmap3, in callback $(this) is equivalent to the current jQuery element which is there $("#test")
$("#test").gmap3({ getlatlng:{ address: "Paris, France", callback: function(results){ if ( !results ) return; $(this).gmap3({ marker:{ latLng:results[0].geometry.location } }); } } });