Location module is not fulfilling some needs, so I've got into a point where there nothing else to do but start coding. The idea is to do the following patches as soons as I can, based on 6.x-3.1 version:

  • one country only
    I think a great part of Drupal sites are national wide (created for users of one country only); so there is a lot of code in Location module that can be jumped for that kind of site
  • district/county/subregion field
    some countries, like Brazil, have their cities divided into districts or counties or subregions; so location based sites can't help their users efficiently without this field
  • auto-complete re-use of locations
    in many sites (like the event/venue model) repeated locations are the most common; so it will be much easier and space saver to have a location load auto-complete field (name or street)
  • zip code based locations
    in Brazil, zip codes are strictly numeric and summarize state, city, district AND street portion (bigger streets have 2 or more zip codes); this way table location needs to handle just the fields name, number, additional and zip code; the rest of location data will be left for zipcodes table* with the zip code as index
    *: this table have no reason to be pre-filled, like UK or US model, as the amount of zip codes is an 8-digit number
  • location load auto-complete zipcode field
    brazilian location based sites can have their location form with just 3 fields: zip code, number and additional (for locations already in the db);

The project is to make them independent, to be applied combined or not, according the site needs.

Comments, ideas and contributions will be welcome.

Comments

magnus.ramon’s picture

When I said 'patches' I was stupidly referring to new features, not necessarily implemented as patches. Considering the open source vision and Drupal community, remembered by tmcw, I'm thinking the solution for one country only and auto-complete re-use of locations problems as containing module oriented (not sure if containing module is the term form modules wrapped in the main module release).

Here are my ideas:

  • one country only
    I'll give a look into the possibility of making multiple countries locations as an option, a containing module for Locations
  • auto-complete re-use of locations
    another optional module, in case the site needs unique locations only

But about district field problem, I'll wrap the open source vision with some of my own thoughts:

  • district field
    the simplicity of this feature is not proportional to the way processing, querying and storage will be increased with a contributed module solution; in this case I think starting with a patch is better to see if there is enough users interested in the feature and then care about making it right
    if so, I'm thinking of it as a default feature, reflected this way in db, with a containing module to disable it (including it's column elimination)

At last:

  • location load auto-complete zipcode field
    I'll give a look into it only after the other features have been implemented

Again: comments, ideas and contributions are very welcome.

shaneonabike’s picture

Did you make any progress on any of these?

glottus’s picture

subscribe

asxnot’s picture

Status: Needs work » Needs review
StatusFileSize
new12.71 KB

Since I urgently needed the autocomplete/reuse feature for my site, this afternoon I developed a preliminary patch starting from the 6.x-3.1 version.
I tested it for my Location CCK field and everything seems to be OK. I do not know if it works for Location Node as well.

Unfortunately I do not know how to make my changes to become a plugin or a submodule of location.

The patch has been done with git. Hope it works :) If not I can attach the two files involved: location.module and location_autocomplete.js

john franklin’s picture

Version: 6.x-3.1 » 6.x-3.2
StatusFileSize
new9.69 KB

Here is a re-rolled version of the patch in #4 updated for Location 6.x-3.2.

john franklin’s picture

Last two patches include a call to dd() in location_save_locations(). This will fail if you don't have the devel module enabled.

Status: Needs review » Needs work

The last submitted patch, 908932-Location-Location_autocomplete-5.patch, failed testing.

john franklin’s picture

Version: 6.x-3.2 » 6.x-3.3
Status: Needs work » Needs review
StatusFileSize
new9 KB

Rerolled for 6.x-3.3, minus dd() call.

Status: Needs review » Needs work
Issue tags: -location auto-complete, -zip code based locations, -brazilian zip codes, -brazilian locations, -location county field, -location district field

The last submitted patch, 908932-location_autocomplete-8.patch, failed testing.

legolasbo’s picture

Issue summary: View changes
Status: Needs work » Closed (outdated)

Closing old D6 issues as D6 is end of life

legolasbo’s picture

Closing old D6 issues as D6 is end of life