1 package net.systemeD.potlatch2.utils {
3 import net.systemeD.halcyon.Map;
4 import net.systemeD.halcyon.VectorLayer;
5 import net.systemeD.halcyon.connection.Marker;
6 import net.systemeD.potlatch2.BugLayer;
9 import flash.system.Security;
11 public class BugLoader {
14 private var bugBaseURL:String;
15 private var bugApiKey:String;
16 private var _layer:VectorLayer;
17 private static const STYLESHEET:String="bugs.css";
20 public function BugLoader(map:Map, url:String, bugApiKey:String):void {
22 this.bugBaseURL = url;
23 this.bugApiKey = bugApiKey;
24 var policyFile:String = bugBaseURL+"crossdomain.xml";
25 Security.loadPolicyFile(policyFile);
28 public function load():void {
29 layer.loadBbox(map.edge_l, map.edge_r, map.edge_t, map.edge_b);
33 private function get layer():VectorLayer {
36 _layer=new BugLayer(n,map,STYLESHEET,bugBaseURL,bugApiKey);
37 map.addVectorLayer(_layer);