Opened 6 years ago

Last modified 2 years ago

#16235 assigned enhancement

[patch] [cla] dojox/geo/openlayers AMD

Reported by: Philippe May Owned by: dylan
Priority: low Milestone: 1.15
Component: Dojox Version: 1.8.1
Keywords: Cc:
Blocked By: Blocking:

Description

The dojox/geo/openlayers currently requires OpenLayers? to be loaded through a <script> tag, breaking the principles of dynamic module loading.

Incidentally there is an option to build OpenLayers? for AMD compatibility in the recent evolutions (development version, to be included in the next release).

Dojox/geo/openlayers should be accepting the 2 options.

Proposed patches attached to this ticket, they consist of:

  • a loader plugin (maybeamd.js) which loads the AMD OL version, or just returns the globally defined one
  • minor modifications of the existing files, defining "OpenLayers?" as a local variable resulting of the plugin
  • README file describing the process involved, specifically a "openlayers-amd" configuration variable, set through dojoConfig or "has". If the "openlayers-amd" option is not set, OpenLayers? is retrieved form the global environment, a legacy fallback.

Attachments (5)

README.rst (1.1 KB) - added by Philippe May 6 years ago.
maybeamd.js (1.3 KB) - added by Philippe May 6 years ago.
openlayer-amd-patch.2.diff (2.7 KB) - added by Philippe May 6 years ago.
Please consider this patch file (debugger statement removed)
openlayer-amd-patch.diff (2.7 KB) - added by Philippe May 6 years ago.
Please consider this patch file (debugger statement removed)
test_amd.html (3.1 KB) - added by Philippe May 6 years ago.

Download all attachments as: .zip

Change History (14)

Changed 6 years ago by Philippe May

Attachment: README.rst added

Changed 6 years ago by Philippe May

Attachment: maybeamd.js added

Changed 6 years ago by Philippe May

Attachment: openlayer-amd-patch.2.diff added

Please consider this patch file (debugger statement removed)

Changed 6 years ago by Philippe May

Attachment: openlayer-amd-patch.diff added

Please consider this patch file (debugger statement removed)

comment:1 Changed 6 years ago by Adam Peller

Owner: changed from Adam Peller to Tom Trenka
Status: newassigned

comment:2 Changed 6 years ago by bill

Aprilmay, looks like you haven't filed a CLA, can you do that first?

comment:3 Changed 6 years ago by Philippe May

I filled the CLA. I'm also adding a quick test for the proposed evolution.

Changed 6 years ago by Philippe May

Attachment: test_amd.html added

comment:4 Changed 6 years ago by bill

Summary: dojox/geo/openlayers AMD[patch] [cla] dojox/geo/openlayers AMD

comment:5 Changed 6 years ago by Tom Trenka

Owner: changed from Tom Trenka to cjolif

comment:6 Changed 5 years ago by cjolif

Owner: cjolif deleted
Status: assignedopen

I definitely don't have/won't have the time to look into this one.

comment:7 Changed 4 years ago by dylan

Milestone: tbd1.11
Owner: set to dylan
Priority: undecidedlow
Status: openassigned

comment:8 Changed 3 years ago by dylan

Milestone: 1.111.12

comment:9 Changed 2 years ago by dylan

Milestone: 1.131.15

Ticket planning... move current 1.13 tickets out to 1.15 to make it easier to move tickets into the 1.13 milestone.

Note: See TracTickets for help on using tickets.