| Package | net.systemeD.halcyon |
| Class | public class Map |
| Inheritance | Map flash.display.Sprite |
| Property | Defined by | ||
|---|---|---|---|
| backdrop : Object reference to backdrop sprite
| Map | ||
| baselon : Number urllon-xradius/masterscale;
| Map | ||
| basey : Number lat2lat2p(urllat)+yradius/masterscale;
| Map | ||
| centre_lat : Number | Map | ||
| centre_lon : Number | Map | ||
| draggable : Boolean [write-only] Should map be allowed to pan?
| Map | ||
| dragstate : uint = 0 Is the map being panned
| Map | ||
| edge_b : Number | Map | ||
| edge_l : Number | Map | ||
| edge_r : Number | Map | ||
| edge_t : Number | Map | ||
| editableLayer : MapPaint
[read-only]
| Map | ||
| initparams : Object object containing HTML page parameters: lat, lon, zoom, background_dim, background_sharpen, tileblocks
| Map | ||
| mapheight : uint height (Flash pixels)
| Map | ||
| mapwidth : uint width (Flash pixels)
| Map | ||
| scale : uint = 14 map scale
| Map | ||
| scalefactor : Number = 5825.4222222222 current scaling factor for lon/latp
| Map | ||
| showall : Boolean = true show all objects, even if unstyled?
| Map | ||
| tileset : TileSet
background tile object
| Map | ||
| Method | Defined by | ||
|---|---|---|---|
|
Map()
Map constructor function
| Map | ||
|
addDebug(text:String):void
| Map | ||
|
addLayer(connection:Connection, styleurl:String, backgroundlayer:Boolean = true, interactive:Boolean = false):MapPaint
| Map | ||
|
clearDebug():void
| Map | ||
|
coord2lat(a:Number):Number
| Map | ||
|
coord2latp(a:Number):Number
| Map | ||
|
coord2lon(a:Number):Number
| Map | ||
|
download():void
Download map data.
| Map | ||
|
entityMouseEvent(event:MouseEvent, entity:Entity):void
| Map | ||
| Map | |||
|
getDimming():Boolean
Return background dimming.
| Map | ||
|
Find which paint object an entity will be displayed on.
| Map | ||
|
getLayers():Array
Get all the layers available for this Map object
| Map | ||
|
getSharpen():Boolean
Return background sharpening.
| Map | ||
|
init(startlat:Number, startlon:Number, startscale:uint = 0):void
Initialise map at a given lat/lon
| Map | ||
|
keyUpHandler(event:KeyboardEvent):void
Respond to cursor movements and zoom in/out.
| Map | ||
|
lat2coord(a:Number):Number
| Map | ||
|
lat2latp(a:Number):Number
| Map | ||
|
latp2coord(a:Number):Number
| Map | ||
|
latp2lat(a:Number):Number
| Map | ||
|
lon2coord(a:Number):Number
| Map | ||
|
mouseDownHandler(event:MouseEvent):void
Prepare for being dragged by recording start time and location of mouse.
| Map | ||
|
mouseMoveHandler(event:MouseEvent):void
Respond to mouse movement, dragging the map if tolerance threshold met.
| Map | ||
|
mouseUpHandler(event:MouseEvent = null):void
Respond to mouse up by possibly moving map.
| Map | ||
|
moveMapFromLatLon(lat:Number, lon:Number):void
Recentre map at given lat/lon, updating the UI and downloading entities.
| Map | ||
|
nudgeBackground(x:Number, y:Number):void
Sets the offset between the background imagery and the map.
| Map | ||
|
redraw():void
| Map | ||
|
redrawPOIs():void
| Map | ||
|
removeLayerByName(name:String):void
| Map | ||
|
scrollIfNeeded(lat:Number, lon:Number):void
Recentre map at given lat/lon, if that point is currently outside the visible area.
| Map | ||
|
setController(controller:MapController):void
Assign map controller.
| Map | ||
|
setDimming(dim:Boolean):void
Set background dimming on/off.
| Map | ||
|
setSharpen(sharpen:Boolean):void
Set background sharpening on/off.
| Map | ||
|
updateCoords(tx:Number, ty:Number):void
Recalculate co-ordinates from new Flash origin
| Map | ||
|
updateCoordsFromLatLon(lat:Number, lon:Number):void
Move the map to centre on a given latitude/longitude.
| Map | ||
|
updateSize(w:uint, h:uint):void
Resize map size based on current stage and height
| Map | ||
|
zoomIn():void
| Map | ||
|
zoomOut():void
| Map | ||
| Constant | Defined by | ||
|---|---|---|---|
| DRAGGING : uint = 2 | Map | ||
| MASTERSCALE : Number = 5825.4222222222 master map scale - how many Flash pixels in 1 degree longitude (for Landsat, 5120)
| Map | ||
| MAXSCALE : uint = 23 don't zoom in past this
| Map | ||
| MINSCALE : uint = 13 don't zoom out past this
| Map | ||
| NOT_DRAGGING : uint = 0 | Map | ||
| NOT_MOVED : uint = 1 | Map | ||
| TOLERANCE : uint = 7 How far the map can be dragged without actually triggering a pan.
| Map | ||
| backdrop | property |
public var backdrop:Objectreference to backdrop sprite
| baselon | property |
public var baselon:Numberurllon-xradius/masterscale;
| basey | property |
public var basey:Numberlat2lat2p(urllat)+yradius/masterscale;
| centre_lat | property |
public var centre_lat:Number
| centre_lon | property |
public var centre_lon:Number
| draggable | property |
draggable:Boolean [write-only]Should map be allowed to pan?
Implementation public function set draggable(value:Boolean):void
| dragstate | property |
public var dragstate:uint = 0Is the map being panned
| edge_b | property |
public var edge_b:Number
| edge_l | property |
public var edge_l:Number
| edge_r | property |
public var edge_r:Number
| edge_t | property |
public var edge_t:Number
| editableLayer | property |
| initparams | property |
public var initparams:Objectobject containing HTML page parameters: lat, lon, zoom, background_dim, background_sharpen, tileblocks
| mapheight | property |
public var mapheight:uintheight (Flash pixels)
| mapwidth | property |
public var mapwidth:uintwidth (Flash pixels)
| scale | property |
public var scale:uint = 14map scale
| scalefactor | property |
public var scalefactor:Number = 5825.4222222222current scaling factor for lon/latp
| showall | property |
public var showall:Boolean = trueshow all objects, even if unstyled?
| tileset | property |
public var tileset:TileSetbackground tile object
| Map | () | constructor |
public function Map()Map constructor function
| addDebug | () | method |
public function addDebug(text:String):voidParameters
text:String |
| addLayer | () | method |
public function addLayer(connection:Connection, styleurl:String, backgroundlayer:Boolean = true, interactive:Boolean = false):MapPaintParameters
connection:Connection |
|
styleurl:String |
|
backgroundlayer:Boolean (default = true) |
|
interactive:Boolean (default = false) |
MapPaint |
| clearDebug | () | method |
public function clearDebug():void
| coord2lat | () | method |
public function coord2lat(a:Number):NumberParameters
a:Number |
Number |
| coord2latp | () | method |
public function coord2latp(a:Number):NumberParameters
a:Number |
Number |
| coord2lon | () | method |
public function coord2lon(a:Number):NumberParameters
a:Number |
Number |
| download | () | method |
public function download():voidDownload map data. Data is downloaded for the connection and the vector layers, where supported. The bounding box for the download is taken from the current map edges.
| entityMouseEvent | () | method |
public function entityMouseEvent(event:MouseEvent, entity:Entity):voidParameters
event:MouseEvent |
|
entity:Entity |
| findLayer | () | method |
| getDimming | () | method |
public function getDimming():BooleanReturn background dimming.
ReturnsBoolean |
| getLayerForEntity | () | method |
public function getLayerForEntity(entity:Entity):MapPaintFind which paint object an entity will be displayed on.
Parametersentity:Entity |
MapPaint |
| getLayers | () | method |
public function getLayers():ArrayGet all the layers available for this Map object
ReturnsArray — An array of MapPaint objects |
| getSharpen | () | method |
public function getSharpen():BooleanReturn background sharpening.
ReturnsBoolean |
| init | () | method |
public function init(startlat:Number, startlon:Number, startscale:uint = 0):voidInitialise map at a given lat/lon
Parametersstartlat:Number |
|
startlon:Number |
|
startscale:uint (default = 0) |
| keyUpHandler | () | method |
public function keyUpHandler(event:KeyboardEvent):voidRespond to cursor movements and zoom in/out.
Parametersevent:KeyboardEvent |
| lat2coord | () | method |
public function lat2coord(a:Number):NumberParameters
a:Number |
Number |
| lat2latp | () | method |
public function lat2latp(a:Number):NumberParameters
a:Number |
Number |
| latp2coord | () | method |
public function latp2coord(a:Number):NumberParameters
a:Number |
Number |
| latp2lat | () | method |
public function latp2lat(a:Number):NumberParameters
a:Number |
Number |
| lon2coord | () | method |
public function lon2coord(a:Number):NumberParameters
a:Number |
Number |
| mouseDownHandler | () | method |
public function mouseDownHandler(event:MouseEvent):voidPrepare for being dragged by recording start time and location of mouse.
Parametersevent:MouseEvent |
| mouseMoveHandler | () | method |
public function mouseMoveHandler(event:MouseEvent):voidRespond to mouse movement, dragging the map if tolerance threshold met.
Parametersevent:MouseEvent |
| mouseUpHandler | () | method |
public function mouseUpHandler(event:MouseEvent = null):voidRespond to mouse up by possibly moving map.
Parametersevent:MouseEvent (default = null) |
| moveMapFromLatLon | () | method |
public function moveMapFromLatLon(lat:Number, lon:Number):voidRecentre map at given lat/lon, updating the UI and downloading entities.
Parameterslat:Number |
|
lon:Number |
| nudgeBackground | () | method |
public function nudgeBackground(x:Number, y:Number):voidSets the offset between the background imagery and the map.
Parametersx:Number |
|
y:Number |
| redraw | () | method |
public function redraw():void
| redrawPOIs | () | method |
public function redrawPOIs():void
| removeLayerByName | () | method |
public function removeLayerByName(name:String):voidParameters
name:String |
| scrollIfNeeded | () | method |
public function scrollIfNeeded(lat:Number, lon:Number):voidRecentre map at given lat/lon, if that point is currently outside the visible area.
Parameterslat:Number |
|
lon:Number |
| setController | () | method |
public function setController(controller:MapController):voidAssign map controller.
Parameterscontroller:MapController |
| setDimming | () | method |
public function setDimming(dim:Boolean):voidSet background dimming on/off.
Parametersdim:Boolean |
| setSharpen | () | method |
public function setSharpen(sharpen:Boolean):voidSet background sharpening on/off.
Parameterssharpen:Boolean |
| updateCoords | () | method |
public function updateCoords(tx:Number, ty:Number):voidRecalculate co-ordinates from new Flash origin
Parameterstx:Number |
|
ty:Number |
| updateCoordsFromLatLon | () | method |
public function updateCoordsFromLatLon(lat:Number, lon:Number):voidMove the map to centre on a given latitude/longitude.
Parameterslat:Number |
|
lon:Number |
| updateSize | () | method |
public function updateSize(w:uint, h:uint):voidResize map size based on current stage and height
Parametersw:uint |
|
h:uint |
| zoomIn | () | method |
public function zoomIn():void
| zoomOut | () | method |
public function zoomOut():void
| DRAGGING | constant |
public const DRAGGING:uint = 2
| MASTERSCALE | constant |
public const MASTERSCALE:Number = 5825.4222222222master map scale - how many Flash pixels in 1 degree longitude (for Landsat, 5120)
| MAXSCALE | constant |
public const MAXSCALE:uint = 23don't zoom in past this
| MINSCALE | constant |
public const MINSCALE:uint = 13don't zoom out past this
| NOT_DRAGGING | constant |
public const NOT_DRAGGING:uint = 0
| NOT_MOVED | constant |
public const NOT_MOVED:uint = 1
| TOLERANCE | constant |
public const TOLERANCE:uint = 7How far the map can be dragged without actually triggering a pan.