olwrapper-0.4.1: An OpenLayers JavaScript Wrapper and Webframework with snaplet-fay

Safe HaskellNone
LanguageHaskell2010

OpenLayers.Func

Contents

Description

 

Synopsis

NEW FUNCTION

newLayerMqt Source

Arguments

:: String

map type

-> Object

new layer (Tile)

new MapQuest layer

newLayerOSM Source

Arguments

:: Object

new layer (Tile)

new OpenStreetMap layer

newVector Source

Arguments

:: Object

vectorsource

-> Opacity

opacity

-> Fay Object

new layer (Vector)

new Layer as vector

newFeatureLine Source

Arguments

:: [(Double, Double)]

input coordinates

-> Fay Object 

new map source GeoJSON as LineString

newFeaturePoint Source

Arguments

:: (Double, Double)

an input coordinate

-> Fay Object 

new map source GeoJSON as Point

newOlInput Source

Arguments

:: JQuery

element to bind to

-> String

case (f.e. "checked" by Checkbox)

-> Object

map object (f.e. 'getLayerByIndex 0')

-> String

attribute of map object to change (f.e. "visible")

-> Fay ()

return type is void

new OpenLayers DOM binding

ADD FUNCTION

addSingleClickEventAlertCoo Source

Arguments

:: String

EPSG-Code of custom projection (f.e. "EPSG:4326")

-> Fay ()

return type is void

add an event on "singleclick" to display pop-up with coordinates in mercator and custom projection

addBaseLayer :: MapSource -> Fay () Source

add a layer to the map, and remove all layers before inserting (baselayer has now index 0)

addMapLayer :: MapSource -> Fay () Source

add a MapSource to the map

addLayer :: Object -> Fay () Source

add a layer to the map

addStyledFeature Source

Arguments

:: GeoFeature

input (GeoPoint or GeoLine)

-> Opacity

opacity for the GeoFeature

-> Fay () 

add a GeoFeature to a new layer to the map (first add coordinates to a new feature and then add the style and the id to this new feature, at least create a layer with the feature and add the layer to the map)

addStyledFeatures Source

Arguments

:: [GeoFeature]

input (GeoPoint and/or GeoLine)

-> Opacity

global opacity for the GeoFeatures

-> Fay () 

add more than one GeoFeature to a new layer (similar to the addStyledFeature function)

addFeatures Source

Arguments

:: Object

layer

-> [Object]

featurearray

-> Fay () 

add an array with features to a layer

addPointFromLabels Source

Arguments

:: String

id of the HTML element for the first coordinate (element need value, must be a double, see Coordinate)

-> String

id of the HTML element for the seconde coordinate (element need value, must be a double, see Coordinate)

-> String

id of the HTML element for the opacity (element need value, must be an integer, see Opacity)

-> String

id of the HTML element for the feature id (element need value, must be a positive integer, see id)

-> GeoPointStyle

define the style of the feature

-> Fay () 

add a new point feature (and a new layer) by defining from HTML elements

addMapWindowEvent Source

Arguments

:: String

the event trigger (f.e. "moveend")

-> Fay JQuery

action on the event

-> Fay () 

add a map event listener (f.e. when zoom or pan)

addOlDomInput Source

Arguments

:: String

id of the HTML element which triggers

-> String

HTML value to trigger (f.e. "checked")

-> String

layer attribute to manipulate (f.e. "visible")

-> Object

layer to manipulate

-> Fay () 

add a connection between HTML and OpenLayers to manipulate layer attributes

REMOVE FUNCTION

removeLayers :: Fay () Source

remove all layers from the map

removeLayer Source

Arguments

:: a

layer to remove

-> Fay () 

remove a layer object (only use with layers)

CHANGE FUNCTION

zoomIn Source

Arguments

:: Integer

number of zoomlevels to change

-> Fay () 

zoom IN and specify levels to change

zoomOut Source

Arguments

:: Integer

number of zoomlevels to change

-> Fay () 

zoom OUT and specify levels to change

styleFeature Source

Arguments

:: Object

the prevoiusly created new feature

-> GeoFeature

the GeoFeature object of the prevoiusly created feature

-> Fay () 

style a feature after creating a new feature and before adding to a new layer (this is an internal function for addStyledFeature and addStyledFeatures)

styleFeature' :: Object -> Object -> Fay () Source

style a feature FFI function

changeBaseLayer Source

Arguments

:: MapSource

new MapSource for the baselayer

-> Fay () 

change the baselayer at layerindex 0

SET FUNCTION

setId Source

Arguments

:: Object

layer with the requested feature

-> Integer

new id for the feature ( > 0)

-> Integer

index of the feature in the layer (Layer.getFeatures()[i] , i >= 0)

-> Fay () 

set the id of a feature, get the feature by layer and featureindex

setFeatureId Source

Arguments

:: Object

vector

-> GeoFeature

input for the id

-> Fay () 

set the id of the first feature of the vector

setCenter :: Coordinate -> Fay () Source

set map center with a Coordinate

setCenter' :: (Double, Double) -> Fay () Source

set map center FFI function

setCenterZoom Source

Arguments

:: Coordinate

center position

-> Integer

zoomlevel

-> Fay ()

return type is void

set the map center and the zoomlevel at the same time

setZoom :: Integer -> Fay () Source

set the zoomlevel of the map

GET FUNCTION

getCenter Source

Arguments

:: Projectionlike

requested projection

-> Integer

decimal places

-> Fay Text 

get map center in requested projection with n decimal places

getCenter' :: Fay (Double, Double) Source

get map center FFI function

getZoom :: Fay Text Source

get map zoom level

getLayers :: Fay [Object] Source

get an array of all layers in the map

getLayerByIndex :: Integer -> Object Source

get a layer by index and return a object

getLayerByIndex' :: Integer -> Fay Object Source

get a layer by index and return a fay object

getFeatureId :: Object -> Integer Source

get the id of a feature (OpenLayers Feature)

getVectorFeatureAt Source

Arguments

:: Object

Vector

-> Integer

index of vector features

-> Object 

get a feature from a vector at index position

getVectorFeatureLength Source

Arguments

:: Object

Vector

-> Integer

number of features in vector

get the number of features in a vector

TRANSFORM FUNCTION

transformPointTo Source

Arguments

:: Projectionlike

target projection

-> (Double, Double)

input

-> (Double, Double)

output

transform coordinates from mercator to requested projection

transformPoint Source

Arguments

:: Coordinate

input

-> (Double, Double)

output

transform Coordinate to mercator (EPSG:3857)

transformPoints :: [Coordinate] -> [(Double, Double)] Source

transform Coordinates to mercator (EPSG:3857)

OTHER FUNCTION

coordFixed :: (Double, Double) -> Integer -> Fay Text Source

create a Text from a tuple of doubles with fixed decimal places and seperator ","

toDouble :: Text -> Double Source

change Text to Double

mapS :: (a -> Fay b) -> [a] -> Fay [b] Source

sequence the map-function

zipWithS :: (a -> b -> Fay c) -> [a] -> [b] -> Fay [c] Source

sequence the zipWith-function