API Documentation | All Packages | All Classes | Index | Frames No Frames |
Class PolyLayers

Package | org.openscales.core.layer
Class | public class PolyLayers
Inheritance | PolyLayers Layer flash.display.Sprite

his class allow to have a layer with two layer inside , one layer is displayed according to scale

Public Properties
Hide Inherited Public Properties
Show Inherited Public Properties

| Property | Defined by
--- | --- | ---
|  | DEFAULT_MAXEXTENT : Bounds [static] | Layer
|  | DEFAULT_PROJECTION : ProjProjection [static] | Layer
|  | displayed : Boolean | Layer
|  | extent : Bounds A Bounds object which represents the lon/lat bounds of the current viewPort. | Layer
|  | imageSize : Size For layers with a gutter, the image is larger than the tile by twice the gutter in each dimension. | Layer
|  | inRange : Boolean | Layer
|  | isBaseLayer : Boolean Whether or not the layer is a base layer. | Layer
|  | isFixed : Boolean Whether or not the layer is a fixed layer. | Layer
|  | loadComplete : Boolean Whether or not the layer is loading data | Layer
|  | map : Map [write-only] | PolyLayers
|  | maxExtent : Bounds [write-only] | PolyLayers
|  | maxResolution : Number [read-only] | PolyLayers
|  | maxZoomLevel : Number | Layer
|  | minResolution : Number [read-only] | PolyLayers
|  | minZoomLevel : Number | Layer
|  | numZoomLevels : Number Number of zoom levels | Layer
|  | projection : ProjProjection [read-only] | PolyLayers
|  | proxy : String Proxy (usually a PHP, Python, or Java script) used to request remote servers like WFS servers in order to allow crossdomain requests. | Layer
|  | resolutions : Array A list of map resolutions (map units per pixel) in descending order. | Layer
|  | security : ISecurity | Layer
|  | visible : Boolean | Layer
|  | zindex : int | Layer
|  | zoomToSwitch : Number Get a polyLayers zoomToSwitch | PolyLayers

Protected Properties
Hide Inherited Protected Properties
Show Inherited Protected Properties

| Property | Defined by
--- | --- | ---
|  | _imageSize : Size = null | Layer
|  | loading : Boolean Used to set loading status of layer | Layer

Public Methods
Hide Inherited Public Methods
Show Inherited Public Methods

| Method | Defined by
--- | --- | ---
|  | PolyLayers(name:String, firstLayer:Layer, lastLayer:Layer, zoomToSwitch:Number, isBaseLayer:Boolean = false, visible:Boolean = true) | PolyLayers
|  | changeLayer():void | PolyLayers
|  | clear():void Clear the layer graphics | PolyLayers
|  | destroy(setNewBaseLayer:Boolean = true):void | PolyLayers
|  | generateResolutions(numZoomLevels:uint, nominalResolution:Number):void | Layer
|  | getDisplayLayer():Layer return the layer that is displayed on the map | PolyLayers
|  | getFeatureLayer():FeatureLayer return the vector layer, if there one return the vector layer that is displayed if there are two return null if there are no vector layer this function is usefull , for legend(for example). | PolyLayers
|  | getLonLatFromMapPx(viewPortPx:Pixel):LonLat Return a LonLat which is the passed-in map Pixel, translated into lon/lat by the layer. | Layer
|  | getMapPxFromLonLat(lonlat:LonLat):Pixel Return a Pixel which is the passed-in LonLat,translated into map pixels. | Layer
|  | getURL(bounds:Bounds):String | Layer
|  | getZoomForExtent(extent:Bounds):Number | Layer
|  | getZoomForResolution(resolution:Number):Number Return The index of the zoomLevel (entry in the resolutions array) that corresponds to the best fit resolution given the passed in value and the 'closest' specification. | Layer
|  | onMapMove(e:MapEvent):void | Layer
|  | onMapResize(e:MapEvent):void | PolyLayers
|  | onMapZoom(e:MapEvent):void | PolyLayers
|  | onSecurityInitialized(e:SecurityEvent):void | Layer
|  | redraw(fullRedraw:Boolean = true):void Clear and draw, if needed, layer based on current data eventually retreived previously by moveTo function. | PolyLayers
|  | removeEventListenerFromMap():void | Layer
|  | reset():void Reset layer data | PolyLayers

Protected Methods
Hide Inherited Protected Methods
Show Inherited Protected Methods

| Method | Defined by
--- | --- | ---
|  | draw():void Reset layer data | Layer

Public Constants
Hide Inherited Public Constants
Show Inherited Public Constants

| Constant | Defined by
--- | --- | ---
|  | DEFAULT_NOMINAL_RESOLUTION : Number = 1.40625 [static] | Layer
|  | DEFAULT_NUM_ZOOM_LEVELS : uint = 16 [static] | Layer
|  | DEFAULT_SRS_CODE : String = "EPSG:4326" [static] | Layer
|  | RESOLUTION_TOLERANCE : Number = 0.000001 [static] | Layer

Property detail

map | property

`map:Map` [write-only]Implementation
`public function set map(value:Map):void`

maxExtent | property |

`maxExtent:Bounds` [write-only]Implementation
`public function set maxExtent(value:Bounds):void`

maxResolution | property |

`maxResolution:Number` [read-only]Implementation
`public function get maxResolution():Number`

minResolution | property |

`minResolution:Number` [read-only]Implementation
`public function get minResolution():Number`

projection | property |

`projection:ProjProjection` [read-only]Implementation
`public function get projection():ProjProjection`

zoomToSwitch | property |

`zoomToSwitch:Number` [read-write]

Get a polyLayers zoomToSwitch

Implementation
`public function get zoomToSwitch():Number`
`public function set zoomToSwitch(value:Number):void`
Constructor detail

PolyLayers | () | constructor

`public function PolyLayers(name:String, firstLayer:Layer, lastLayer:Layer, zoomToSwitch:Number, isBaseLayer:Boolean = false, visible:Boolean = true)`Parameters

| `name:String`
| `firstLayer:Layer`
| `lastLayer:Layer`
| `zoomToSwitch:Number`
| `isBaseLayer:Boolean` (default = `false`)``
| `visible:Boolean` (default = `true`)``

Method detail

changeLayer | () | method

`public function changeLayer():void`

clear | () | method |

`public override function clear():void`

Clear the layer graphics

destroy | () | method |

`public override function destroy(setNewBaseLayer:Boolean = true):void` Parameters

| `setNewBaseLayer:Boolean` (default = `true`)``

getDisplayLayer | () | method |

`public function getDisplayLayer():Layer`

return the layer that is displayed on the map

Returns

| `Layer`

getFeatureLayer | () | method |

`public function getFeatureLayer():FeatureLayer`

return the vector layer, if there one return the vector layer that is displayed if there are two return null if there are no vector layer this function is usefull , for legend(for example).

Returns

| `FeatureLayer`

onMapResize | () | method |

`public override function onMapResize(e:MapEvent):void` Parameters

| `e:MapEvent`

onMapZoom | () | method |

`public override function onMapZoom(e:MapEvent):void` Parameters

| `e:MapEvent`

redraw | () | method |

`public override function redraw(fullRedraw:Boolean = true):void`

Clear and draw, if needed, layer based on current data eventually retreived previously by moveTo function.

Parameters

| `fullRedraw:Boolean` (default = `true`)``

reset | () | method |

`public override function reset():void`

Reset layer data