Many (or most) people using the locaiton module do not want to force their users to see the longitude / latitude entry form. This patch makes this a configurable option in the location module settings and defaults the option to 'disabled'.

Comments

webgeer’s picture

Now that I see that setting the lat/long is "access control"ed, I think that also controlling by a setting is unnecessary. Only users who are granted permission will see the lat/long entries. Access control is an ideal solution, so if a site relys on users to enter addresses or zip codes and then relys on geocoding, the administrator or other responsible user can still edit or provide lat/long where there is a problem with the geocoded one.

I say don't bother with this.

However, if this is done, I would like to see it separated out for nodes and users.

Zack Rosen’s picture

StatusFileSize
new4.16 KB

Access controll is the wrong way to implement this. From a user perspective this should be a configurable option. Overloading the access control system to enable / disable this functionality creates a lot of confusion. I've rerolled the patch to remove the access controll system for long/lat controlls and to implement it as a configurable option instead.

webgeer’s picture

I think access control is the _better_ way to do it.

The main reason you don't want users to be able to enter lat/long is to prevent them from entering bad lat/long's when geocoding would provide good lat/longs. However, geocoding is not perfect and having a way that administrators can fix problems is a good idea. This also allows one to hide the advanced feature of setting lat/long from the naive users.

The other reason you would not want lat/longs entered is if you just don't care about it, in which case it doesn't really matter. Leaving disabled for all users is fine.

Zack Rosen’s picture

My big concern is the usability problems this creates. It is very confusing and annoying to have the long/lat form showing up for all users and there not being a clear way of disabling it when location module is installed. If we really need to make this configurable by user roles I can reroll a patch the patch tomorrow but I'd rather avoid more messy code and messy options. Do you know for a fact users will need to be able to disable this feature based on user rolls? If not I'd much rather leave it as a simple configuration option.

webgeer’s picture

Yes I just tested it with the cvs version of lcotion module with my gmap patch on it.

Users that have the ability to create nodes with locaiton data have fields to enter the default location data. But no lat/long data. Users that have the access control to enter lat/long then have the lacation fields and the lat/long fields when they edit the node. By default users do not have this permission. It has to be turned on. (So by default only the admin account can set lat/long.)

I think that the current cvs version is fine and no patches are needed.

Zack Rosen’s picture

If this patch doesn't break anyones use case I think it is a much cleaner implementation from a code and usability perspective. It is very confusing having some of the toggles for these features be configured on the settings and others (the long / lat fields) be toggled only through permissions.

ankur’s picture

The access control system allows you to decide which roles of users should be trusted with entering a latitude/longitude for a piece of content. I would imagine that there could easily be a case where a site-owner wants to allow this privilege for some users and not allow it for others. I can also imagine situations where the site-owner would want to allow anyone to submit a latitude/longitude for certain pieces of content, not caring about their accuracy, where as s/he would be worried about the lat/lon accuracy for a nodes submitted for a different content type and only be in a position to trust a few people with the manual lat/lon entry for that node type. In anycase, I'm only saying that I would like to see this broken out by node-type AND role if possible.

Will let this sit for now and see what others say.

-Ankur

Zack Rosen’s picture

Understood. My concern is we are sacrificing usability for functionality we do not know is useful.

ankur’s picture

Very well. Break it out by node-type using hook_nodeapi(). If there's a request to break it out by roles, we can address that later.

-Ankur

ankur’s picture

Status: Needs review » Needs work
mpare’s picture

Component: Code » Miscellaneous

I couldn't get the code to work using patch, but upon manual implementation and initial impressions I would say this is a nice enhancement. I think it might would be nice to have this option in the content type settings, because on one of our sites we have content types that we would not wish to have manual lat/long enable or disabled for all content types.

Thanks Guys,

-Matt

rediguana’s picture

I'd like to see this incorporated into the module proper. I had just raised this in a new issue before finding this one. I am off to experiment with the patch now and see if I can make it work.

I think for consistency, lat/long should be configured like all other location options such as address/city etc - which sounds like this patch accomplishes.

The additional application via ACL is useful - for example, on our GPS Society website, we only want lat/long available to Society members. Perhaps the ACL's need to be expanded so that there are two ACL's - lat/long and address (address, city, country etc)?

Cheers Gav

rediguana’s picture

I assume the age of the patch means that it no longer works against a newer code base? I struck a couple of errors when attempting to patch. I was patching against 4.7.x-1.x-dev

Cheers Gav

scottrigby’s picture

Hi
I added this issue separately, because it relates to this "Map Location" module perhaps more than "Location".
http://drupal.org/node/191122

BUT -- it also relates very much to this particular issue!

I know this issue has been dormant for some time, but if any of you are still subscribed, please see if you think a multilateral approach (between Location & Map Location modules) are in order?

A patch would be fantastic!

Alternately, any suggestions for a temporary workaround would also be appreciated!

catch’s picture

Title: Long/Lat entry fields should be configurable » Long/Lat entry and country fields should be optional
Version: 6.x-3.x-dev » 5.x-2.7
Assigned: Zack Rosen » Unassigned
catch’s picture

Status: Needs work » Closed (duplicate)

In turn duplicate of this meta issue: http://drupal.org/node/217512