Ticket #2259 (closed bug: fixed)

Opened 4 years ago

Last modified 4 years ago

layer container and viewport elements can have same ids for multiple maps

Reported by: tschaub Owned by:
Priority: minor Milestone: 2.9 Release
Component: Map Version: 2.8
Keywords: Cc:
State: Complete

Description

If a map is created with an element that doesn't have an id (or if the map is created with no element at all), the layer container and viewport elements will be given ids like _OpenLayers_Container and _OpenLayers_ViewPort. Two maps created in this way will have the same ids for these elements.

Attachments

id.patch Download (1.0 KB) - added by tschaub 4 years ago.
try to create unique ids

Change History

Changed 4 years ago by tschaub

try to create unique ids

Changed 4 years ago by tschaub

  • state set to Review

Tests pass. Thanks for any review.

Changed 4 years ago by crschmidt

  • state changed from Review to Commit

Tests pass, fixes a buggy behavior. Would be curious to know what turned this up; I don't think anything in OpenLayers uses these? Assume it was a problem for some other tool.

I doubt that this is the only case where duplicate ids can show up; we've not been super-careful about this in the past, in my experience.

Changed 4 years ago by tschaub

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

(In [9704]) Use a unique id for the map viewport. r=crshmidt (closes #2259)

Note: See TracTickets for help on using tickets.