I spent a few hours trying to figure out why my maps were not displaying and why I wasnt getting any lat lon generated from valid addresses on a cck location field. After much digging I figured out that it was because my users entered the State fields with NC instead of North Carolina .. as soon as I switched it everything started working. Im not sure if thats supposed to happen?

Would at least be nice to include some help text with the module that says dont use abbreviations or you'll go crazy hunting something with no errors but a deadly map killing effect. uhm .. well that is unless abbreviations are supposed to work?

Im using the latest gmap dev with the latest location 3.x dev

Cheers!

Comments

yesct’s picture

states are entered autocomplete.. so they have to enter in the whole name, yes? no?

hutch’s picture

@YesCT
There are several issues converging here.

The abbreviations are not actually abbreviations, they are internal codes and should not be visible to the user.
I submitted two patches, see #115323: State/province names should be displayed (during output/views) instead of codes (I have just tested them and they work fine on current cvs)
These ensure that the full state/province/county name is displayed both on the input update side and output side.

There is also a feature request, #364287: State / Province drop down and Full State name in address field
This seeks to replace the somewhat contentious autocomplete field with a dropdown. I will review this ASAP.
This may be the best solution if it can be made to work reliably. Some of the confusion is caused by dodgy data on the backend unfortunately.

The trouble with autocomplete fields is that they work as long as the user does not force the content by ignoring or editing the supplied dropdown content afterwards. At the moment there is no way to prevent this.

There are two workarounds, either replace the autocomplete with a regular dropdown (filled by a jquery callback so as to reflect the currently selected country) or make the existing autocomplete system more robust, possibly by filling a hidden field with the 'real' province_name. I don't know if it's possible to do the latter using the drupal autocomplete system, it's a solution I have used on non-drupal projects in the past.

I would like to see #115323: State/province names should be displayed (during output/views) instead of codes along with #310828: Please remove the extra comma betweeen the state/province and postal_code commited soon, this would reduce confusion I'm sure.

yesct’s picture

Title: State Field shouldn't allow abbreviations as it breaks gmap » State Field should not allow input of abbreviations (any user input that is not an actual providence data item) breaks gmap
Issue tags: +location auto-complete

hutch thanks for the good summary. that helps explain things quite a bit!
does the new title better reflect the issue?

hutch’s picture

I imagine you mean province, providence would be marvellous but I won't be holding my breath ;-)

yesct’s picture

Title: State Field should not allow input of abbreviations (any user input that is not an actual providence data item) breaks gmap » State Field should not allow input of abbreviations (any user input that is not an actual province data item) breaks gmap
Issue tags: +location state province codes kept internal, +location name vs code

Oops. :)

Macronomicus’s picture

Well the thing is .. even though there is an auto-complete the users seemed to enter in the abbreviated which then broke the geolocating for those nodes.

Thanks for showing me those patches .. for some reason I didnt even see those .. and I thought i read all through the cue thoroughly. I will try those patches tonight... for now im just warning my users not to use the abbreviated.

Cheers!

ankur’s picture

Status: Active » Closed (won't fix)

Closing due to lack of continued interest. If this patch worked for anyone that tested it, please feel free to re-open this ticket with your comments.