1 package net.systemeD.potlatch2.utils {
3 import net.systemeD.halcyon.Map;
4 import net.systemeD.halcyon.MapPaint;
5 import net.systemeD.halcyon.connection.Marker;
6 import net.systemeD.potlatch2.BugConnection;
9 import flash.system.Security;
11 public class BugLoader {
14 private var bugBaseURL:String;
15 private var bugApiKey:String;
16 private var bugDetailsURL:String;
17 private var _layer:MapPaint;
18 private var name:String;
19 private static const STYLESHEET:String="stylesheets/bugs.css";
20 private var connection:BugConnection;
23 public function BugLoader(map:Map, url:String, bugApiKey:String, name:String, details:String = ''):void {
25 this.bugBaseURL = url;
26 this.bugApiKey = bugApiKey;
28 this.bugDetailsURL = details;
29 connection = new BugConnection(name, url, bugApiKey, details);
30 _layer = map.addLayer(connection, STYLESHEET, true, true);
31 _layer.visible = false;
34 public function load():void {
35 _layer.visible = true;
36 connection.loadBbox(map.edge_l, map.edge_r, map.edge_t, map.edge_b);