Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
Experimental project
This is a sandbox project, which contains experimental code for developer use only.
This is a module that takes two post fields of json text strings, one of the strings a yahoo location api json result and the other the html5 geolocation data from the client.
The data is then logged in a table and exposed as an entity for use in views.
At the moment there are assumptions about the address data. that will probably not be true for your usage.
At some point there will be an configuration option for mapping the location json text string.
In your javascript:
jQuery.post(
'/sites/all/modules/geo_location_debug/logger.php',
jQuery('#location-debug').serialize()).done(
function(data){
console.log("results: " + data);
}
);
And in a tpl.php file:
<form id="location-debug" class="element-invisible">
<input type="text" name="json">
<input type="text" name="geolocation">
</form>
Project information
- Created by micheas on , updated