Ticket #2564 (closed bug: fixed)

Opened 3 years ago

Last modified 3 years ago

inconsistent API of Map constructor

Reported by: bartvde Owned by:
Priority: minor Milestone: 2.9 Release
Component: documentation Version: 2.9 RC1
Keywords: Cc:
State: Pullup

Description

When using div as the first parameter of the Map constructor, only a string is accepted. However, when specifying div in the options both string and DOMElement are accepted. The first parameter of the Map constructor should also accept a DOMElement so things are more consistent.

Change History

Changed 3 years ago by bartvde

  • summary changed from inconsitent API of Map constructor to inconsistent API of Map constructor

Changed 3 years ago by bartvde

Comment by Fabian:

No problem, so my "bug" report had a little good side effect. Just to
clarify the map constructor also accepts a DOMelement as the first parameter
its just written wrong ;)
As far as I checked the code in map.js, both variants uses the same code:
  this.div = OpenLayers.Util.getElement(div);
So it just needs to be corrected in the DOC of the constructor settings.

Changed 3 years ago by tschaub

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

(In [10170]) Updating docs to indicate that the first argument to the map constructor can be a string or a dom element. (closes #2564)

Changed 3 years ago by tschaub

  • state changed from Complete to Pullup
  • component changed from Map to documentation

This ticket description is a bit misleading. The docs were not complete, but this is not a bug in Map.js.

Changed 3 years ago by bartvde

  • milestone changed from 2.10 Release to 2.9 Release

Since this is marked as pullup changing milestone to 2.9

Changed 3 years ago by bartvde

  • status changed from closed to reopened
  • resolution fixed deleted

Needs to be open to show up in the pullup query

Changed 3 years ago by bartvde

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

Pullup done in r10175

Changed 3 years ago by bartvde

  • version changed from 2.8 to 2.9 RC1
Note: See TracTickets for help on using tickets.