Closed (fixed)
Project:
Openlayers
Version:
6.x-2.x-dev
Component:
Code
Priority:
Minor
Category:
Task
Assigned:
Reporter:
Created:
10 Feb 2010 at 13:40 UTC
Updated:
28 Apr 2010 at 09:30 UTC
I see that AddFeatures and objectFromFeature functions have been moved to the main openlayers.js file. Is there a a reason for this?
AFAIK these are only called from the 'Vector' layer type, is this still the case? If it is, should they be moved over?
Comments
Comment #1
tmcw commentedThe reason is that they are part of the map building process, and the rest of the openlayers_misc.js file was eliminated by just refactoring openlayers.js.
They should only be called on the vector layer type, because Drupal currently only generates vector layers that need features (from Drupal) to be added to them.
Comment #2
phayes commentedCan we safely move this off to the vector layer js file then? It would remove clutter from openlayers.js
Comment #3
tmcw commentedSounds reasonable, might be worth a check to see that no other modules are using addFeatures and test it super-thoroughly, but I think that would be a good change.
Comment #4
phayes commentedComment #5
tmcw commentedphayes, are you going to make this patch? I can probably roll it quite quickly if you don't have any time.
Comment #6
phayes commentedI will have time... eventually. Please go ahead
Comment #7
tmcw commentedActually, openlayers_cck now uses these. I think that they are rather reusable and useful, since more layer types will be using them soon, and there isn't a real middle ground between splaying them around modules and keeping them in openlayers.js. Considering closing this ticket, since this is not a very important change.
Comment #8
zzolo commentedIf this issue happens, then this issue would not be needed: #734702: Make Vector layer generic
Closing for now. Feel free to open up if needed.