It would be great if the map saved the information to the location.module's location table instead of to a different table. Was there a reason to separate it off into its own table?
| Comment | File | Size | Author |
|---|---|---|---|
| #6 | gmap_location.module_7.patch | 5.14 KB | znation |
| #5 | gmap_location.module_6.patch | 5.14 KB | znation |
| #4 | gmap_location.module_5.patch | 5.14 KB | znation |
Comments
Comment #1
webgeer commentedI'm not really that familiar with the details of location module, but my understanding was that it was for marking the locations of nodes.
This module only uses its own custom table for marking the locations of users. It should be noted that it is not required to use any custom tables to use the filters or put maps in nodes.
If you are more familiar with location and have an idea how I could use it please give some more details and I will consider that.
Comment #2
geodaniel commentedThe location.module originally used to store only node locations I think, but at some point it was upgraded to store user locations as well. The basic way to do it would be to insert (or update) a record in the location table with
It should probably be done with by utilising a function in the location.module, but the functions in there currently delete any location present and then overwrite it with the new information. So, if somebody had added a street address, but then wanted to use the map to pinpoint their location, that street address would be deleted. I suppose you could do it by retrieving all the location information, changing the lat/long and then writing it all back using the location_user function and op = insert or update.
Comment #3
webgeer commentedInteresting. I don't like the idea of requiring Location module in order to use the user functionality, but I think it would be a good idea to make it compatible with location module.
I think what I will do is I will use the location module functions if they exist and if not I will use my own custom table, but I will change my custom table to be the same as location module table. (That way if someone installs location module after using this module the information will already be there.)
I think I will work with those who develop location.module to figure out what the best way of doing this is.
Unfortunately this will all take a little while to do.
Comment #4
znation commentedI got the GMap user map to work with my existing Location module table by installing gmap.module and gmap_location.module, and making some slight modifications to gmap_location.module. Essentially I had it use the 'oid' field in the location table, rather than 'eid' (which didn't appear to exist). Note that I'm using the 4.7 version of gmap (downloaded it today).
I'm submitting a patch (with "diff -Naur gmap_location.module.orig gmap_location.module") to make that change, but I think it was just a search-and-replace on that whole file of "eid" with "oid".
Comment #5
znation commentedI got the GMap user map to work with my existing Location module table by installing gmap.module and gmap_location.module, and making some slight modifications to gmap_location.module. Essentially I had it use the 'oid' field in the location table, rather than 'eid' (which didn't appear to exist). Note that I'm using the 4.7 version of gmap (downloaded it today).
I'm submitting a patch (with "diff -Naur gmap_location.module.orig gmap_location.module") to make that change, but I think it was just a search-and-replace on that whole file of "eid" with "oid".
Comment #6
znation commentedI got the GMap user map to work with my existing Location module table by installing gmap.module and gmap_location.module, and making some slight modifications to gmap_location.module. Essentially I had it use the 'oid' field in the location table, rather than 'eid' (which didn't appear to exist). Note that I'm using the 4.7 version of gmap (downloaded it today).
I'm submitting a patch (with "diff -Naur gmap_location.module.orig gmap_location.module") to make that change, but I think it was just a search-and-replace on that whole file of "eid" with "oid".
Comment #7
geodaniel commented@znation: this shouldn't be necessary - have you run update.php recently to make sure you've got the latest version of the location table (with eid instead of oid)?
Comment #8
(not verified) commented