Opened 12 years ago

Closed 12 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)

zoomTo-autoload-410-1324-A1.diff (4.8 KB ) - added by belug 12 years ago.
Here's a way to deactivate the autoload.
zoomTo-autoload-410-1324-A2.diff (5.5 KB ) - added by belug 12 years ago.

Download all attachments as: .zip

Change History (10)

comment:1 by adube, 12 years ago

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 ?

comment:2 by adube, 12 years ago

Milestone: 1.2.01.4.0
Type: defectenhancement

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 belug, 12 years ago

Here's a way to deactivate the autoload.

comment:3 by belug, 12 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 adube, 12 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.

comment:5 by belug, 12 years ago

Sorry for the lack of documentation. it's in the new patch now.

comment:6 by adube, 12 years ago

Resolution: fixed
Status: newclosed

Fixed in r1325. Thanks for the patch.

comment:7 by adube, 12 years ago

Resolution: fixed
Status: closedreopened

I should have tested the patch with the existing widget sample : it's currently broken.

comment:8 by adube, 12 years ago

Resolution: fixed
Status: reopenedclosed

Fixed in r1333.

Note: See TracTickets for help on using tickets.