| | 1 | Markers get used to display [wiki:BluePrintGISFeatureLayers Features]. |
| | 2 | |
| | 3 | We have a folder full of samples (in {{{static/img/markers}}}) which then can be supplemented by user uploads. |
| | 4 | |
| | 5 | The Database table therefore needs to have all the samples imported into it. The 'uploads' feature of Web2Py only supports having all files in the single 'uploads' folder & needs them to be named in the format: table.image.name.ext. |
| | 6 | |
| | 7 | In order to allow good maintenance we want to keep the markers named nicely & in their hierarchy. We want a script to copy these files into the uploads folder with the correct names & insert the records into the database to point at them.[[BR]] |
| | 8 | Currently this is done for just the single default marker: {{{marker.png}}} (code in {{{models/_gis.py}}}) [[BR]] |
| | 9 | NB ID=1 is the default marker |
| | 10 | {{{ |
| | 11 | dir=os.path.join(request.folder,'static','markers') |
| | 12 | files=dir.list() |
| | 13 | etc (recursively) |
| | 14 | }}} |
| | 15 | |
| | 16 | We also want these enhancemnets to the marker/create routine: |
| | 17 | * height & width detected automatically |
| | 18 | * use [http://www.pythonware.com/products/pil PIL]? |
| | 19 | * jquery used to populate the fields or else populate via hidden fields |
| | 20 | * jquery to populate the name field from the filename |
| | 21 | |
| | 22 | When choosing Markers, it would be useful to be aware of the original folder hierarchy (look at Sahana2 for example UI for selecting markers) |
| | 23 | |
| | 24 | ---- |
| | 25 | [[wiki:BluePrintGeographicInformationSystems GIS BluePrints]] |