Ticket #3443 (closed feature: fixed)

Opened 10 months ago

Last modified 10 months ago

deprecate OpenLayers.loadURL

Reported by: fredj Owned by:
Priority: minor Milestone: 2.11 Release
Component: general Version: 2.11 RC1
Keywords: Cc:
State: Pullup

Description

Is there any reasons that we want to keep OpenLayers.loadURL ? OpenLayers.Request.GET (#1565) offers the same functionality but with more flexibility.

Attachments

3443.0.patch Download (3.3 KB) - added by fredj 10 months ago.
mark function as deprecated, update examples
3443.1.patch Download (3.6 KB) - added by fredj 10 months ago.
add a warning in OpenLayers.loadURL

Change History

Changed 10 months ago by fredj

mark function as deprecated, update examples

  Changed 10 months ago by erilem

  • state changed from Needs Discussion to Commit
  • version set to 2.11 RC1
  • milestone changed from 3.0 Release to 2.11 Release

It looks good. I don't see any reason for this not to go in 2.11 or 2.12.

  Changed 10 months ago by rdewit

Shouldn't the loadURL method give a deprecation warning like this?

OpenLayers.Console.warn(OpenLayers.i18n("methodDeprecated",
                {'newMethod':'OpenLayers.Request.GET'}));

That's what other deprecated methods seem to do.

  Changed 10 months ago by rdewit

  • state changed from Commit to Needs More Work

Changed 10 months ago by fredj

add a warning in OpenLayers.loadURL

  Changed 10 months ago by fredj

  • state changed from Needs More Work to Review

follow-up: ↓ 7   Changed 10 months ago by erilem

  • state changed from Review to Needs Discussion

I would personally prefer 3443.0.patch Download, because I'm against clobbering and bloating the OpenLayers code with "deprecated" messages. I understand that we want to clearly warn the developer about deprecated usages, but I'd favor relying on the Google Closure compiler (or similar) for that ( http://code.google.com/p/closure-compiler/wiki/Warnings). So -1 on 3443.1.patch Download and +1 on 3443.0.patch Download. What do others think?

  Changed 10 months ago by ahocevar

I agree with erilem here.

in reply to: ↑ 5   Changed 10 months ago by erilem

Replying to erilem:

I would personally prefer 3443.0.patch Download, because I'm against clobbering and bloating the OpenLayers code with "deprecated" messages. I understand that we want to clearly warn the developer about deprecated usages, but I'd favor relying on the Google Closure compiler (or similar) for that ( http://code.google.com/p/closure-compiler/wiki/Warnings). So -1 on 3443.1.patch Download and +1 on 3443.0.patch Download. What do others think?

#3320 expresses what I think in more detail.

  Changed 10 months ago by fredj

+1 for 3443.0.patch instead of 3443.1.patch

  Changed 10 months ago by fredj

  • status changed from new to closed
  • resolution set to fixed

(In [12206]) mark the OpenLayers.loadURL method as deprecated (replaced by OpenLayers.Request.GET). r=erilem,rdewit,ahocevar (closes #3443)

  Changed 10 months ago by fredj

  • status changed from closed to reopened
  • state changed from Needs Discussion to Pullup
  • resolution fixed deleted

  Changed 10 months ago by ahocevar

  • status changed from reopened to closed
  • resolution set to fixed

in 2.11-rc2

Note: See TracTickets for help on using tickets.