Opened 13 years ago
Closed 13 years ago
#410 closed enhancement (fixed)
GeoExtus_ZoomTo - Proj4js defs are not preserved
Reported by: | belug | Owned by: | adube |
---|---|---|---|
Priority: | major | Milestone: | 1.4.0 |
Component: | widgets | Version: | trunk |
Keywords: | zoomto proj4js | Cc: | belug |
Description
I've found a litle problem will adding the ZoomTo widjet, I'm setting a prejection that is not in the Proj4JS lib, the projection was declared by loading a js file with the Proj4js.defsprojection technique before the loading of the ZoomTo widjet.
The problem is that when loading the widjet tell's me that it doesn't find the projection in the Proj4js.defs, after investigation it's true that at the end my custom defs are erased.
What could erase those?
Attachments (2)
Change History (10)
comment:1 by , 13 years ago
comment:2 by , 13 years ago
Milestone: | 1.2.0 → 1.4.0 |
---|---|
Type: | defect → enhancement |
Here's a proposition : since the issue seems to be caused by the automatic proj file inclusion, we could have a new option 'autoLoad' (Boolean) Defaults to true, to turn it off.
I'm setting this as an enhancement for 1.4 since it's getting late for 1.2.
by , 13 years ago
Attachment: | zoomTo-autoload-410-1324-A1.diff added |
---|
Here's a way to deactivate the autoload.
comment:3 by , 13 years ago
While doing the patch I've found how my previusly defined projections would ne erased. Since a new object of Proj4js was created automaticly it would erase the currently loaded projections.
With autoload at false the Proj4js is not reseted.
comment:4 by , 13 years ago
Here's a review :
- could you please provide the documentation about this new option in the .rst file as well ? Mention (Boolean) Defaults to true.
- if it's not too late, I'd go with 'autoLoad' instead of 'autoload' to follow the camelCase convention, but it's not mandatory.
by , 13 years ago
Attachment: | zoomTo-autoload-410-1324-A2.diff added |
---|
comment:6 by , 13 years ago
Resolution: | → fixed |
---|---|
Status: | new → closed |
Fixed in r1325. Thanks for the patch.
comment:7 by , 13 years ago
Resolution: | fixed |
---|---|
Status: | closed → reopened |
I should have tested the patch with the existing widget sample : it's currently broken.
Could you provide a test-case in the form of a patch modifying the zoomto sample and adding your projection definition in the lib directory, please ?
A thing important to know : this widget always attempt to automatically load the epsg proj file for a defined projection. It is mentioned in the first note of its doc :
http://geoprisma.mapgears.com/dist/build/html/widgets/list/stable/GeoExtUX_ZoomTo.html
Could that help ?