Class Mapserv

Object
   |
   +--Mapserv

class Mapserv


This is the basic Mapserv class.
Defined in mapserv.js


Field Summary
 Double cellsize
          calculated length of a pixel side in map units.
 Array defaultextent
          the extent that was passed to this Mapserv instance at construction.
 Object drawHandler
          
 Array extent
          a four-member array of Doubles defining the rectangular extent of the map (in map coordinates).
 Integer height
          the height of the map image (in pixels).
 Float inchesPerMapUnit
          number of inches in the current map unit.
 Array layers
          an associative array of layer status, keyed by layer name; values are booleans.
 String mapfile
          the MapServer configuration file for map draws.
 String mapserver
          the url for the MapServer executable that will create maps.
 Integer maxscale
          maximum scale to allow for map draws.
 Integer minscale
          minimum scale to allow for map draws.
 String mode
          mode in which the MapServer executable will be called.
 String options
          a url query string ("&this=that&some=other") used to pass any application-specific options for a map draw operation that are not covered in the draw() method.
 Float pansize
          amount by which to move the map in automatic pan operations.
 Integer pixelsPerInch
          a value used in scale calculations.
 Array point
          a two-member array of Doubles defining a point of interest (in map coordinates) to the current operation (typically from a user's mouse click).
 Array queryextent
          a four-member array of Doubles defining a rectangular extent (in map coordinates) for a query operation.
 String queryfile
          the MapServer configuration file for query operations.
 Object queryHandler
          
 String queryoptions
          a url query string ("&this=that&some=other") used to store any application-specific options for a query operation that are not covered in the query() method.
 Array querypoint
          a two-member array of Doubles defining a point of interest (in image coordinates) to the current query operation (typically from a user's mouse click).
 String queryserver
          the url for the MapServer executable that will handle queries.
 Mapserv referencemap
          a reference map object.
 String url
          a complete url for a map draw or query operation.
 Integer width
          the width of the map image (in pixels).
 Integer zoomdir
          direction of zoom.
 Object zoomsize
          the zoom factor to be applied on zoom-in operations (the inverse is taken for zoom-out operations).
 
Constructor Summary
Mapserv (<String> mapserver, <String> mapfile, <Double> minx, <Double> miny, <Double> maxx, <Double> maxy, <Integer> width, <Integer> height)
            Construct a new Mapserv object.
 
Method Summary
 void applyBox(<Integer> minx, <Integer> miny, <Integer> maxx, <Integer> maxy)
           convert a box defined in image coordinates to an extent defined in map coordinates and store in the extent field.
 void applyBoxQuery(<Integer> minx, <Integer> miny, <Integer> maxx, <Integer> maxy)
           construct a four-member query extent array in image coordinates and store in the queryextent field.
 void applyPointQuery(<Integer> x,<Integer> y)
           construct a two-member query point array in image coordinates and store in the querypoint field.
 void applyReference(<Integer> x,<Integer> y)
           calculate a new map extent to be centered on an image coordinate from the reference map image, and store in the extent field.
 void applyZoom(<Integer> x, <Integer> y)
           calculate a new map extent based on zoomdir, zoomsize, and the passed point (in image coordinates), and store in the extent field.
 void draw()
           construct a pair of urls (one for the main map and one for the reference map, if applicable) using the current settings of various fields, store them in the url and referencemap.url fields, respectively, and call the drawHandler.
 String getLayers(delimeter)
           Get the list of currently active layers.
 Double getScale()
           get the nominal scale based on current settings.
 void imageToMap(<Integer> x, <Integer> y)
           convert an image coordinate pair to a map coordinate pair, and store in the point field.
 void layersOff()
           Set draw/query status for all layers to off.
 void pan(<Enumerated> direction)
           pan map in the given direction, using the current pansize setting.
 void query()
           construct a query url using the current settings of various fields, store in the url field, and call the queryHandler.
 void recenter(<Double> x, <Double> y)
           recenter the map at the given point, using the current scale.
 void setExtent(<Double> minx, <Double> miny, <Double> maxx, <Double> maxy)
           set extent using the given values.
 void setExtentFromScale(<Double> x, <Double> y, <Integer> scale)
           set extent centered on the given point using the given scale.
 void setHandler(<Enumerated> type, <Function> handler)
           set a handler function for draw/query operations.
 void setLayer(<String> name, <Boolean> status)
           set the draw/query status of a layer.
 void setUnits(<Enumerated> type)
           set the map units.
 void zoomDefault()
           redraw the map at the default extent.
 void zoomIn(<Double> x,<Double> y)
           zoom in centered on the given point, using the current zoomsize setting.
 void zoomOut(<Double> x,<Double> y)
           zoom out centered on the given point, using the inverse of the current zoomsize setting.
 void zoomRadius(<Double> x, <Double> y, <Double> radius)
           draw a new map centered on the given point, with an extent that minimally fits the circle defined by the point and supplied radius.
 void zoomScale(<Double> x, <Double> y, <Integer> scale)
           recenter the map at the given point, using the given scale.

Field Detail

cellsize

Double cellsize

defaultextent

Array defaultextent

drawHandler

Object drawHandler

extent

Array extent

height

Integer height

inchesPerMapUnit

Float inchesPerMapUnit

layers

Array layers

mapfile

String mapfile

mapserver

String mapserver

maxscale

Integer maxscale

minscale

Integer minscale

mode

String mode

options

String options

pansize

Float pansize

pixelsPerInch

Integer pixelsPerInch

point

Array point

queryextent

Array queryextent

queryfile

String queryfile

queryHandler

Object queryHandler

queryoptions

String queryoptions

querypoint

Array querypoint

queryserver

String queryserver

referencemap

Mapserv referencemap

url

String url

width

Integer width

zoomdir

Integer zoomdir

zoomsize

Object zoomsize

Constructor Detail

Mapserv

Mapserv(<String> mapserver, <String> mapfile, <Double> minx, <Double> miny, <Double> maxx, <Double> maxy, <Integer> width, <Integer> height)

Method Detail

applyBox

void applyBox(<Integer> minx, <Integer> miny, <Integer> maxx, <Integer> maxy)

applyBoxQuery

void applyBoxQuery(<Integer> minx, <Integer> miny, <Integer> maxx, <Integer> maxy)

applyPointQuery

void applyPointQuery(<Integer> x,<Integer> y)

applyReference

void applyReference(<Integer> x,<Integer> y)

applyZoom

void applyZoom(<Integer> x, <Integer> y)

draw

void draw()

getLayers

String getLayers(delimeter)

getScale

Double getScale()

imageToMap

void imageToMap(<Integer> x, <Integer> y)

layersOff

void layersOff()

pan

void pan(<Enumerated> direction)

query

void query()

recenter

void recenter(<Double> x, <Double> y)

setExtent

void setExtent(<Double> minx, <Double> miny, <Double> maxx, <Double> maxy)

setExtentFromScale

void setExtentFromScale(<Double> x, <Double> y, <Integer> scale)

setHandler

void setHandler(<Enumerated> type, <Function> handler)

setLayer

void setLayer(<String> name, <Boolean> status)

setUnits

void setUnits(<Enumerated> type)

zoomDefault

void zoomDefault()

zoomIn

void zoomIn(<Double> x,<Double> y)

zoomOut

void zoomOut(<Double> x,<Double> y)

zoomRadius

void zoomRadius(<Double> x, <Double> y, <Double> radius)

zoomScale

void zoomScale(<Double> x, <Double> y, <Integer> scale)


Documentation generated by JSDoc on Fri May 5 14:01:20 2006