The ZoomToSource component provides an option to select which sources should be zoomed to. But the component doesn't check those sources, and instead zooms to the source of every layer in the map.

This bug was introduced in this commit: http://cgit.drupalcode.org/openlayers/commit/?h=7.x-3.x&id=7023fd78b55ce...

The following condition was removed which checks to see if the source is in the list of sources:

if (typeof data.opt.source[source.mn] !== 'undefined') {
...
}
Support from Acquia helps fund testing for Drupal Acquia logo

Comments

m.stenta created an issue. See original summary.

m.stenta’s picture

Status: Active » Needs review
FileSize
1.01 KB

Patch attached - I'm just wrapping the new code that changed in the commit above with the condition that went missing.

Pol’s picture

Status: Needs review » Fixed

Thanks!

  • Pol committed a3ba4bf on 7.x-3.x authored by m.stenta
    Issue #2626172 by m.stenta: ZoomToSource zooms to all sources
    

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.