[OpenLayers-Users] boundingboxes selection
Florian Thürkow
admin at informatik-halle.de
Mon Jun 1 12:40:19 EDT 2009
Hello!
I have a map, which display several different bounding-boxes, the coordinates for which derive from the_geom.
By clicking a bbox a template starts to runs, displaying the data from the entity.
Here is the problem:
There are several identical bboxes, one upon the other, but the user is only able to select one at a time.
I tried to identify the identical bboxes from the array "$foo" and changed the coordinates
of those that are identical. This is unfortunately still not the appropriate way to do it.
$foo = array(
array(-10, 50, 5, 60),
array(-122.6, 37.6, -122.3, 37.9),
array(10, 10, 20, 20),
array(-75, 41, -71, 44),
array(10, 10, 20, 20),
array(-122.6, 37.6, -122.3, 37.9),
array(10, 10, 20, 20)
);
$keys = array_keys($foo);
foreach($keys as $key)
{
$blubb = implode("#", $foo[$key]);
if(!empty($tmp[$blubb]))
{
for($i=0; $i<count($foo[$key]); $i++) {
$foo[$key][$i]+=$tmp[$blubb]; }
$tmp[$blubb]++;
}
else
{
$tmp[$blubb] = 1;
}
}
print_r($foo);
Are there any possibilities to visualize several bboxes, which lie on top of each other, in such a way that the user is able to select the suitable one? Maybe by using a selective attribute?
Thanks for your help!
Florian Thürkow
More information about the Users
mailing list