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

tmcw’s picture

The 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.

phayes’s picture

Can we safely move this off to the vector layer js file then? It would remove clutter from openlayers.js

tmcw’s picture

Sounds 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.

phayes’s picture

Assigned: Unassigned » phayes
tmcw’s picture

phayes, are you going to make this patch? I can probably roll it quite quickly if you don't have any time.

phayes’s picture

I will have time... eventually. Please go ahead

tmcw’s picture

Priority: Normal » Minor
Status: Active » Needs review

Actually, 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.

zzolo’s picture

Status: Needs review » Closed (fixed)

If 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.