Closed (fixed)
Project:
Openlayers
Version:
6.x-2.x-dev
Component:
OpenLayers API
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
16 Jul 2010 at 16:25 UTC
Updated:
4 Aug 2010 at 09:30 UTC
Jump to comment: Most recent file
Comments
Comment #1
zzolo commented+1 on this. It will definitely be useful on the map alters. I would suggest putting the preset name into the map array so that it could be used in other places if necessary, as well as updating the passing of argument seems unnecessary and could possibly break the use of the hooks (but probably not).
Comment #2
strk commentedThe attached patch adds 'preset_name' attribute to the preset data (the one being passed around to hooks and also containing the 'id').
Note that (for future improvements/cleanups) openlayers_render_map, which currently takes an optional preset_name, might get it from first argument if not explicitly overridden by caller (didn't touch that code in this patch).
Comment #3
strk commentedOr maybe, another approach, is that IFF a preset is available, $preset->data['preset'] = $preset
That way we'd have all preset informations available, and probably with no data copies ($preset being a stdClass).
Comment #4
strk commentedUhm, tried the approach in previous comment, but it will have troubles serializing the recursion:
Well, 'preset_name' is good enough for now...
Comment #5
strk commentedComment #6
strk commentedCommitted http://drupal.org/cvs?commit=395868
Comment #7
strk commentedExcellent start with CVS... correct commit is here: http://drupal.org/cvs?commit=395870