Package | net.systemeD.halcyon |
Class | public class Map |
Inheritance | Map ![]() |
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:Object
reference to backdrop sprite
baselon | property |
public var baselon:Number
urllon-xradius/masterscale;
basey | property |
public var basey:Number
lat2lat2p(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 = 0
Is 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:Object
object containing HTML page parameters: lat, lon, zoom, background_dim, background_sharpen, tileblocks
mapheight | property |
public var mapheight:uint
height (Flash pixels)
mapwidth | property |
public var mapwidth:uint
width (Flash pixels)
scale | property |
public var scale:uint = 14
map scale
scalefactor | property |
public var scalefactor:Number = 5825.4222222222
current scaling factor for lon/latp
showall | property |
public var showall:Boolean = true
show all objects, even if unstyled?
tileset | property |
public var tileset:TileSet
background tile object
Map | () | constructor |
public function Map()
Map constructor function
addDebug | () | method |
public function addDebug(text:String):void
Parameters
text:String |
addLayer | () | method |
public function addLayer(connection:Connection, styleurl:String, backgroundlayer:Boolean = true, interactive:Boolean = false):MapPaint
Parameters
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):Number
Parameters
a:Number |
Number |
coord2latp | () | method |
public function coord2latp(a:Number):Number
Parameters
a:Number |
Number |
coord2lon | () | method |
public function coord2lon(a:Number):Number
Parameters
a:Number |
Number |
download | () | method |
public function download():void
Download 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):void
Parameters
event:MouseEvent |
|
entity:Entity |
findLayer | () | method |
getDimming | () | method |
public function getDimming():Boolean
Return background dimming.
ReturnsBoolean |
getLayerForEntity | () | method |
public function getLayerForEntity(entity:Entity):MapPaint
Find which paint object an entity will be displayed on.
Parametersentity:Entity |
MapPaint |
getLayers | () | method |
public function getLayers():Array
Get all the layers available for this Map object
ReturnsArray — An array of MapPaint objects |
getSharpen | () | method |
public function getSharpen():Boolean
Return background sharpening.
ReturnsBoolean |
init | () | method |
public function init(startlat:Number, startlon:Number, startscale:uint = 0):void
Initialise map at a given lat/lon
Parametersstartlat:Number |
|
startlon:Number |
|
startscale:uint (default = 0 )
|
keyUpHandler | () | method |
public function keyUpHandler(event:KeyboardEvent):void
Respond to cursor movements and zoom in/out.
Parametersevent:KeyboardEvent |
lat2coord | () | method |
public function lat2coord(a:Number):Number
Parameters
a:Number |
Number |
lat2latp | () | method |
public function lat2latp(a:Number):Number
Parameters
a:Number |
Number |
latp2coord | () | method |
public function latp2coord(a:Number):Number
Parameters
a:Number |
Number |
latp2lat | () | method |
public function latp2lat(a:Number):Number
Parameters
a:Number |
Number |
lon2coord | () | method |
public function lon2coord(a:Number):Number
Parameters
a:Number |
Number |
mouseDownHandler | () | method |
public function mouseDownHandler(event:MouseEvent):void
Prepare for being dragged by recording start time and location of mouse.
Parametersevent:MouseEvent |
mouseMoveHandler | () | method |
public function mouseMoveHandler(event:MouseEvent):void
Respond to mouse movement, dragging the map if tolerance threshold met.
Parametersevent:MouseEvent |
mouseUpHandler | () | method |
public function mouseUpHandler(event:MouseEvent = null):void
Respond to mouse up by possibly moving map.
Parametersevent:MouseEvent (default = null )
|
moveMapFromLatLon | () | method |
public function moveMapFromLatLon(lat:Number, lon:Number):void
Recentre map at given lat/lon, updating the UI and downloading entities.
Parameterslat:Number |
|
lon:Number |
nudgeBackground | () | method |
public function nudgeBackground(x:Number, y:Number):void
Sets 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):void
Parameters
name:String |
scrollIfNeeded | () | method |
public function scrollIfNeeded(lat:Number, lon:Number):void
Recentre 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):void
Assign map controller.
Parameterscontroller:MapController |
setDimming | () | method |
public function setDimming(dim:Boolean):void
Set background dimming on/off.
Parametersdim:Boolean |
setSharpen | () | method |
public function setSharpen(sharpen:Boolean):void
Set background sharpening on/off.
Parameterssharpen:Boolean |
updateCoords | () | method |
public function updateCoords(tx:Number, ty:Number):void
Recalculate co-ordinates from new Flash origin
Parameterstx:Number |
|
ty:Number |
updateCoordsFromLatLon | () | method |
public function updateCoordsFromLatLon(lat:Number, lon:Number):void
Move the map to centre on a given latitude/longitude.
Parameterslat:Number |
|
lon:Number |
updateSize | () | method |
public function updateSize(w:uint, h:uint):void
Resize 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.4222222222
master map scale - how many Flash pixels in 1 degree longitude (for Landsat, 5120)
MAXSCALE | constant |
public const MAXSCALE:uint = 23
don't zoom in past this
MINSCALE | constant |
public const MINSCALE:uint = 13
don'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 = 7
How far the map can be dragged without actually triggering a pan.