]> git.openstreetmap.org Git - potlatch2.git/blobdiff - net/systemeD/halcyon/VectorLayer.as
Marker UIs, implemented using copy+paste
[potlatch2.git] / net / systemeD / halcyon / VectorLayer.as
index 51ea006e61b33ac6efb56b837f2311e4863e649f..7b4a8dcce584ecad21c511af8e94471c0ed478e5 100644 (file)
@@ -95,7 +95,9 @@ package net.systemeD.halcyon {
                public function getObjectsByBbox(left:Number, right:Number, top:Number, bottom:Number):Object {
                        // ** FIXME: this is just copied-and-pasted from Connection.as, which really isn't very
                        // good practice. Is there a more elegant way of doing it?
-                       var o:Object = { poisInside: [], poisOutside: [], waysInside: [], waysOutside: [] };
+                       var o:Object = { poisInside: [], poisOutside: [], waysInside: [], waysOutside: [],
+                              markersInside: [], markersOutside: [] };
+                              
                        for each (var way:Way in ways) {
                                if (way.within(left,right,top,bottom)) { o.waysInside.push(way); }
                                                                  else { o.waysOutside.push(way); }
@@ -104,6 +106,10 @@ package net.systemeD.halcyon {
                                if (poi.within(left,right,top,bottom)) { o.poisInside.push(poi); }
                                                                  else { o.poisOutside.push(poi); }
                        }
+            for each (var marker:Marker in markers) {
+                if (marker.within(left,right,top,bottom)) { o.markersInside.push(marker); }
+                                                     else { o.markersOutside.push(marker); }
+            }
                        return o;
                }