Changeset 488:bb5362caa689
- Timestamp:
- 01/23/10 11:32:39 (7 months ago)
- Author:
- rgrp <http://rufuspollock.org>
- Branch:
- default
- Message:
-
[js,map]: follow up to cset:bc4d2b8e3009 to fix issue with map editor by setting long/lat to (0,0) when no long/lat (o/w no initial marker so no way to move it).
- Files:
-
Legend:
- Unmodified
- Added
- Removed
-
|
r470
|
r488
|
|
| 207 | 207 | |
| 208 | 208 | setFactlet: function (factlet) { |
| | 209 | // what to do if no location or default location (which has no coords)? |
| | 210 | // 1. leave it and sort it out in mapClick |
| | 211 | // 2. set a default location on factlet here |
| | 212 | // Opt for 2 |
| | 213 | if (factlet.data.location == null || |
| | 214 | factlet.data.location.geometry.coordinates[0] == null) { |
| | 215 | factlet.data.location = { |
| | 216 | 'type': 'Feature', |
| | 217 | 'properties': {}, |
| | 218 | 'geometry': { 'type': 'Point', 'coordinates': [0.0,0.0] } |
| | 219 | }; |
| | 220 | } |
| 209 | 221 | var factletsGJ = this.factletsToGeoJSON([factlet]); |
| 210 | 222 | this.vectorLayer.removeFeatures(this.vectorLayer.features); |