Changes between Version 9 and Version 10 of BluePrint/GIS/LocationSelector


Ignore:
Timestamp:
11/22/10 09:59:57 (11 years ago)
Author:
Fran Boon
Comment:

S3LocationSelector work-in-progress

Legend:

Unmodified
Added
Removed
Modified
  • BluePrint/GIS/LocationSelector

    v9 v10  
    2323
    2424== !ToDo ==
     25 * Move the implementation to a server-side widget so that it applies automatically to all instances of the field (can then remove from custom view templates)
     26  * Work has started on this: S3LocationSelector in {{{modules/widgets.py}}} & {{{static/scriptsS3/s3.locationselector.widget.js}}}.[[BR]]Enable by uncommenting in {{{models/03_gis.py}}} & comment the old autocomplete in a view to try it out (e.g. {{{views/cr/shelter_autocompletes.html}}}).
    2527 * Increase Robustness (currently there are many bugs)
    2628 * Redesign the Look/Feel to make it more usable
     
    3032  * Don't load the Map within the page but do this as a separate server-side call
    3133 * Make it work with components (see below)
    32  * Move the implementation to a server-side widget so that it applies automatically to all instances of the field (can then remove from custom view templates)
    3334 * Add an HTML5 !GeoLocation option ('Current Location')
    3435  * we should use a 'nearby' algorithm (like gis.get_features_in_radius()) to re-use existing locations rather than adding a new one each time.
     
    4142 * Experiment with downloading all Locations at startup (into a [http://api.jquery.com/data/ jQuery Data store]) & filtering client-side, or maybe downloading just the full next level of hierarchy proactively (e.g. we've got the L0 selected, we have the L1 dropdown populated accordingly...we could download *all* L2s within the L0 ready for when the L1 is selected & then filter the downloaded L2 data to those within the relevant L1 to populate the L2 dropdown with). This would also provide an automatic cache (within the page only).
    4243 * Extend the location_id() API to support controlling which levels of hierarchy we're interested in for a resource (some may be only interested in the province, whereas others may need a precise location)
     44
    4345=== Known Issues ===
    4446There are various bugs in the current implementation, some of which are listed below.
     
    4850
    4951==== Use in Component Forms ====
    50 To be able to apply the location selector to components (e.g. person/presence, where it would be *very* useful), we need to go away from the 'request.controller+"_"+request_function' construction and instead use jr.
     52To be able to apply the location selector to components (e.g. person/presence, where it would be *very* useful), we need to go away from the 'request.controller + "_" + request_function' construction and instead use jr.
    5153
    5254Perhaps this way:
    5355{{{
    5456 {{try:}}
    55    var location_id = '{{=jr.prefix+"_"+jr.target()[1]+ "_location_id"}}';
     57   var location_id = '{{=jr.prefix + "_" + jr.target()[1] + "_location_id"}}';
    5658 {{except:}}
    57    var location_id = '{{=request.controller+"_"+request.function+ "_location_id"}}';
     59   var location_id = '{{=request.controller + "_" + request.function + "_location_id"}}';
    5860 {{pass}}
    5961}}}