Library: ImageNavigatorOverlay.js
Overview
This is the Pictometry Online Image Navigator Overlay Module. The Overlay Module is a component of the Image Navigator API used to overlay vector data onto Pictometry images. This module is written entirely in Javascript and uses AJAX technology to interface to the Pictometry Online Image Database.

See: Getting Started for a quick tutorial on how the Image Navigator Overlay Module is used.

NOTE: The DistanceTo() and BearingTo() method implementations in Pol.VI.LatLng are derived from here: © Chris Veness.

NOTE: See: Ed Williams' Aviation Formulary for Bearing algorithm.

  • author: Steven D. Adams [email protected]
  • namespace: Pol.VI.ImageNavigator
  • version: 1.0.4.0
Constructors
Pol.VI.Shape()
Base class for Image Navigator shape objects.

This class should NEVER be directly instantiated.

The methods below are common to all shapes.

methods
Pol.VI.Pixel(x, y)
Construct a Pixel object.
parameters
int x X-coordinate offset.
int y Y-coordinate offset.
methods
Pol.VI.Size(width, height)
Construct a Size object.
parameters
int width Width of object.
int height Height of object.
methods
Pol.VI.Icon(copy, image)
Construct an Icon object.
parameters
Icon copy Icon object to copy. (optional)
string image Path to new image. (optional)
Pol.VI.LatLng(lat, lng, alt)
Construct a LatLng object.
parameters
float lat Point latitude.
float lng Point longitude.
float alt (Optional) Point altitude in meters.
methods
Pol.VI.MarkerOptions(copy)
Construct a Marker Options object.
parameters
MarkerOptions copy (optional) Construct new object from copy.
properties
Pol.VI.Marker(points, cfg)
Construct a Marker object. Subclassed from Pol.VI.Shape.
parameters
LatLng points Latitude and Longitude.
MarkerOptions cfg (Optional) Marker configuration options.
methods
Pol.VI.ElementOptions(copy)
Construct an Element Options object.
parameters
ElementOptions copy (optional) Construct new object from copy.
properties
Pol.VI.Element(points, cfg)
Construct an Element object. Subclassed from Pol.VI.Shape.
parameters
LatLng points Latitude and Longitude. (Required)
ElementOptions cfg Element configuration options.
methods
Pol.VI.Point(points, cfg)
Construct a Point object. Subclassed from Pol.VI.Shape.
parameters
LatLng points Latitude and Longitude.
Object cfg (Optional) The configuration object. See: SetConfig
methods
Pol.VI.Polyline(points, cfg)
Construct a Polyline object. Subclassed from Pol.VI.Shape.
parameters
Array of LatLng points Array of vertices.
Object cfg (Optional) The configuration object. See: SetConfig
methods
Pol.VI.Polygon(points, cfg)
Construct a Polygon object. Subclassed from Pol.VI.Shape.
parameters
Array of LatLng points Array(s) of vertices.
Object cfg (Optional) The configuration object. See: SetConfig
methods
Pol.VI.Circle(point, cfg)
Construct a Circle object. Subclassed from Pol.VI.Shape.
parameters
Object point Contains center point and radius point lat/lng.
Object cfg (Optional) The configuration object. See: SetConfig
methods
Pol.VI.Text(points, cfg)
Construct a Text object. Subclassed from Pol.VI.Shape.
parameters
LatLng points Latitude and Longitude.
Object cfg (Optional) The configuration object. See: SetConfig
methods
Pol.VI.Layer(cfg)
Construct a Layer object. Subclassed from Pol.VI.Shape.
parameters
Object cfg (Optional) The configuration object. See: SetConfig
methods
Pol.VI.Feature(name, cfgs)
Construct a Feature object. Subclassed from Pol.VI.Shape.

Overview

Feature is a container object that overlays named geographic features onto Pictometry images.

The object supports the following feature shapes:

  • Polygons
  • Polylines
  • Points
parameters
string name The name of the feature.
Object cfgs (Optional) The configuration objects. See: SetConfig
methods
Pol.VI.Streets(name, cfgs)
Construct a Streets object. Subclassed from Pol.VI.Feature.

Overview

Streets is a container object that overlays street and highway features onto Pictometry images.

parameters
string name The name of the streets feature.
Object cfgs (Optional) The configuration objects. See: SetConfig
methods
Functions
Pol.VI.Shape.SetConfig(cfg)
Set the configuration for the Shape object.
parameters
Object cfg The configuration object.
Pol.VI.Shape.GetConfig()
Get the configuration for the Shape object.
returns
Object The configuration object.
Make the shape visible in the overlay.
Hide the shape in the overlay.
Pol.VI.Shape.IsVisible()
Returns true if the shape is visible.
Pol.VI.Shape.SetId(id)
Set the shape id.
parameters
string id The shape id.
Pol.VI.Shape.GetId()
Return the shape id.
Pol.VI.Shape.GetPoints()
Return the coordinate points for the shape.
returns
LatLng or Array of LatLng The shape coordinates.
Pol.VI.Shape.SetPoints(points)
Set new coordinate points for the shape.
parameters
LatLng or Array of LatLng points The shape coordinates.
Pol.VI.Pixel.Equals(other)
Returns true iff width and height are equal to other.
parameters
other
Pol.VI.Pixel.toString()
Returns a string that contains the x and y pixels coordinates, separated by a comma.
Pol.VI.Size.Equals(other)
Returns true iff width and height are equal to other.
parameters
other
Pol.VI.Size.toString()
Returns a string that contains the width and height, separated by a comma.
Pol.VI.LatLng.SetLatLng(lat, lng, alt)
Set a new latitude/longitude.
parameters
float lat Point latitude.
float lng Point longitude.
float alt (Optional) Point altitude in meters.
Pol.VI.LatLng.Equals(points)
Compare this location to another for equality.
parameters
LatLng points Lat/Lng object.
returns
boolean True if coordinates are equal to points up to some precision.
Pol.VI.LatLng.DistanceTo(there)
Compute distance from here to there in meters.
parameters
LatLng there Lat/Lng object.
returns
float Distance from here to there in meters or NaN on errors.
Pol.VI.LatLng.OverThere(bearing, distance)
Calculate destination point from here to there given the bearing and distance.
parameters
float bearing Bearing in degrees.
float distance Distance in meters.
returns
LatLng Destination point or null if computation failed.
Pol.VI.LatLng.BearingTo(there)
Calculate bearing between points here and there.
parameters
LatLng there Lat/Lng object.
returns
float Bearing from here to there in degrees.
Get the latitude.
returns
float The latitude coordinate in degrees, as a number between -90 and +90.
Get the longitude.
returns
float The longitude coordinate in degrees, as a number between -180 and +180.
Get the altitude.
returns
float The altitude in meters.
Pol.VI.LatLng.toRad(deg)
Convert from degrees to radians.
parameters
float deg Degree value.
returns
float Degrees in radians.
Pol.VI.LatLng.toDeg(rad)
Convert from radians to degrees.
parameters
float rad Radian value.
returns
float Radians in degrees.
Pol.VI.LatLng.toString()
Convert object to a string representation.
returns
string A string that contains the lat/lng/alt coordinates, separated by a comma.
Pol.VI.Marker.SetConfig(cfg)
Set the configuration for the Marker object.
parameters
MarkerOptions cfg (Optional) The configuration object. See: MarkerOptions
Pol.VI.Marker.GetConfig()
Get the configuration for the Marker object.
returns
MarkerOptions The configuration object.
Pol.VI.Marker.SetDraggable(onoff)
Set drag/drop to on or off.
parameters
boolean onoff True for drag on, false for drag off.
Pol.VI.Marker.IsDraggable()
Is marker draggable?
returns
boolean True if marker is draggable, false otherwise.
Pol.VI.Element.SetConfig(cfg)
Set the configuration for the Element object.
parameters
ElementOptions cfg (Optional) The configuration object. See: ElementOptions
Pol.VI.Element.GetConfig()
Get the configuration for the Element object.
returns
ElementOptions The configuration object.
Pol.VI.Point.SetConfig(cfg)
Set the configuration for the Point object.
  color - HTML color code for the point color. Default is #0000ff.
  opacity - Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  altitudeMode - Indicates how to treat altitude values. Default is AnchorToGround. See AltitudeMode

  The example below demonstrates the format of a configuration object for SetConfig() or for the constructor:

    var cfg = {color : '#ff0000', opacity : 1.0};
parameters
Object cfg The configuration object.
Pol.VI.Point.GetConfig()
Get the configuration for the Point object.
 The fields in the returned configuration object are:

  color - HTML color code for the point color. Default is #0000ff.
  opacity - Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  altitudeMode - Indicates how to treat altitude values. Default is AnchorToGround. See AltitudeMode
returns
Object The configuration object.
Pol.VI.Polyline.SetConfig(cfg)
Set the configuration for the Polyline object.
  strokeColor - HTML color code for the line color. Default is #0000ff.
  strokeWeight - Width of the line in pixels. Default is 1px.
  strokeOpacity - Stroke Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  strokeLinecap - Line capability attribute. Line caps can be butt, round, or square. Default is butt.
  strokeLinejoin - Line join attribute. Line joints can be miter, round, or bevel. Default is miter.
  altitudeMode - Indicates how to treat altitude values. Default is AnchorToGround. See AltitudeMode
  text - Text configuration object for annotations. It contains these fields:
    fontFamily - Font family. Default is Arial.
    fontSize -  Font size. Default is 14px.
    fontWeight - normal or bold. Default is normal.
    fontStyle - normal or italic. Default is normal.
    fontColor - Text color. Default is #ffff00.

  The example below demonstrates the format of a configuration object for SetConfig() or for the constructor:

    var cfg = {strokeColor : '#ff0000', strokeWeight : '2px', strokeOpacity : 1.0};
parameters
Object cfg The configuration object.
Pol.VI.Polyline.GetConfig()
Get the configuration for the Polyline object.
The fields in the returned configuration object are:

  strokeColor - HTML color code for the line color. Default is #0000ff.
  strokeWeight - Width of the line in pixels. Default is 1px.
  strokeOpacity - Stroke Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  strokeLinecap - Line capability attribute. Line caps can be butt, round, or square. Default is butt.
  strokeLinejoin - Line join attribute. Line joints can be miter, round, or bevel. Default is miter.
  altitudeMode - Indicates how to treat altitude values. Default is AnchorToGround. See AltitudeMode
  text - Text configuration object for annotations. It contains these fields:
    fontFamily - Font family.
    fontSize -  Font size.
    fontWeight - 'normal' or 'bold'.
    fontStyle - 'normal' or 'italic'.
    fontColor - Text color.
returns
Object The configuration object.
Pol.VI.Polyline.SetText(text)
Set the text annotations for the polyline.
  Each object in the array contains these fields:

    segment - Segment number to render the text.
    text - Annotation text.
    distance - (Optional) Distance, in pixels, from the segment. Default is 10.
parameters
Array of Objects text Text object array.
Pol.VI.Polyline.ClearText()
Clear all text annotations for the polygon.
Pol.VI.Polyline.GetDistance(unit, cb)
Get the distance along the polyline.
 See: Pol.VI.DistanceResult for a description of the callback object.
parameters
Pol.VI.DistanceUnits unit Unit of the computed distance.
function cb Measurement callback function.
Pol.VI.Polygon.SetConfig(cfg)
Set the configuration for the Polygon object.
  strokeColor - HTML color code for the line color. Default is #0000ff.
  strokeWeight - Width of the line in pixels. Default is 1px.
  strokeOpacity - Stroke Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  fillColor - HTML color code for the fill color. Default is no fill.
  fillOpacity - Fill Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  altitudeMode - Indicates how to treat altitude values. Default is AnchorToGround. See AltitudeMode
  text - Text configuration object for annotations. It contains these fields:
    fontFamily - Font family. Default is Arial.
    fontSize -  Font size. Default is 14px.
    fontWeight - normal or bold. Default is normal.
    fontStyle - normal or italic. Default is normal.
    fontColor - Text color. Default is #ffff00.

  The example below demonstrates the format of a configuration object for SetConfig() or for the constructor:

    var cfg = {strokeColor : '#ff0000', strokeWeight : '2px', strokeOpacity : 1.0, fillColor : '#ff0000', fillOpacity : 0.20};
parameters
Object cfg The configuration object.
Pol.VI.Polygon.GetConfig()
Get the configuration for the Polygon object.
The fields in the returned configuration object are:

  strokeColor - HTML color code for the line color. Default is #0000ff.
  strokeWeight - Width of the line in pixels. Default is 1px.
  strokeOpacity - Stroke Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  fillColor - HTML color code for the fill color. Default is no fill.
  fillOpacity - Fill Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  altitudeMode - Indicates how to treat altitude values. Default is AnchorToGround. See AltitudeMode
  text - Text configuration object for annotations. It contains these fields:
    fontFamily - Font family.
    fontSize -  Font size.
    fontWeight - 'normal' or 'bold'.
    fontStyle - 'normal' or 'italic'.
    fontColor - Text color.
returns
Object The configuration object.
Pol.VI.Polygon.SetText(text)
Set the text annotations for the polygon.
  Each object in the array contains these fields:

    segment - Segment number to render the text.
    text - Annotation text.
    distance - (Optional) Distance, in pixels, from the segment. Default is 10.
parameters
Array of Objects text Text object array.
Pol.VI.Polygon.ClearText()
Clear all text annotations for the polygon.
Pol.VI.Polygon.GetArea(unit, cb)
Get the area of the polygon.
 See: Pol.VI.AreaResult for a description of the callback object.
parameters
Pol.VI.AreaUnits unit Unit of the computed area.
function cb Measurement callback function.
Pol.VI.Polygon.GetDistance(unit, cb)
Get the distance (perimeter) of the polygon.
 See: Pol.VI.DistanceResult for a description of the callback object.
parameters
Pol.VI.DistanceUnits unit Unit of the computed distance.
function cb Measurement callback function.
Pol.VI.Circle.SetConfig(cfg)
Set the configuration for the Circle object.
  strokeColor - HTML color code for the line color. Default is #0000ff.
  strokeWeight - Width of the line in pixels. Default is 1px.
  strokeOpacity - Stroke Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  fillColor - HTML color code for the fill color. Default is no fill.
  fillOpacity - Fill Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  altitudeMode - Indicates how to treat altitude values. Default is AnchorToGround. See AltitudeMode

  The example below demonstrates the format of a configuration object for SetConfig() or for the constructor:

    var cfg = {strokeColor : '#ff0000', strokeWeight : '2px', strokeOpacity : 1.0, fillColor : '#ff0000', fillOpacity : 0.20};
parameters
Object cfg The configuration object.
Pol.VI.Circle.GetConfig()
Get the configuration for the Circle object.
The fields in the returned configuration object are:

  strokeColor - HTML color code for the line color. Default is #0000ff.
  strokeWeight - Width of the line in pixels. Default is 1px.
  strokeOpacity - Stroke Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  fillColor - HTML color code for the fill color. Default is no fill.
  fillOpacity - Fill Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  altitudeMode - Indicates how to treat altitude values. Default is AnchorToGround. See AltitudeMode
returns
Object The configuration object.
Pol.VI.Circle.GetArea(unit, cb)
Get the area of the circle.
 See: Pol.VI.AreaResult for a description of the callback object.
parameters
Pol.VI.AreaUnits unit Unit of the computed area.
function cb Measurement callback function.
Pol.VI.Circle.GetDistance(unit, cb)
Get the distance (circumference) around the circle.
 See: Pol.VI.DistanceResult for a description of the callback object.
parameters
Pol.VI.DistanceUnits unit Unit of the computed distance.
function cb Measurement callback function.
Pol.VI.Text.SetConfig(cfg)
Set the configuration for the Text object.
  fontFamily - (string) Font family.
  fontSize -  (string) Font size.
  fontWeight - (string) 'normal' or 'bold'.
  fontStyle - (string) 'normal' or 'italic'.
  color - (HTML color code) Text color.
  opacity - (float) Opacity value. 0.0 is transparent, 1.0 is opaque.
  textAnchor - (string) Anchor the text relative to the 'start', 'middle', or 'end' of the point.
  altitudeMode - Indicates how to treat altitude values. Default is AnchorToGround. See AltitudeMode

  Example:
		The example below demonstrates the format of a configuration object for SetConfig() or for the constructor:

      text.SetConfig({fontfamily : 'Arial', color : '#ff0000', fontSize : '20px', textAnchor : 'start'});
parameters
Object cfg The configuration object.
Pol.VI.Text.GetConfig()
Get the configuration for the Text object.
The fields in the returned configuration object are:

  fontFamily - (string) Font family.
  fontSize -  (string) Font size.
  fontWeight - (string) 'normal' or 'bold'.
  fontStyle - (string) 'normal' or 'italic'.
  color - (HTML color code) Text color.
  opacity - (float) Opacity value. 0.0 is transparent, 1.0 is opaque.
  textAnchor - (string) Anchor the text relative to the 'start', 'middle', or 'end' of the point.
  altitudeMode - Indicates how to treat altitude values. Default is AnchorToGround. See AltitudeMode
returns
Object The configuration object.
Pol.VI.Text.SetText(text)
Set text for the object.
parameters
string text Text string to add to the object.
Pol.VI.Text.GetText()
Get the element text.
returns
string The element text.
Pol.VI.Layer.SetConfig(cfg)
Set the configuration for the Layer object.
The configuration object contains two fields:

  shapes - An array of shape configuration objects.
  altitudeMode - Indicates how to treat altitude values. Default is AnchorToGround. See AltitudeMode

  Each element in the shapes configuration array contains these fields:

  type - Indicates the shape for this configuration.
  strokeColor - HTML color code for the line color. Default is #0000ff.
  strokeWeight - Width of the line in pixels. Default is 1px.
  strokeOpacity - Stroke Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  fillColor - HTML color code for the fill color. Default is no fill.
  fillOpacity - Fill Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  strokeLinecap - Line caps can be butt, round, or square. Default is butt.
  strokeLinejoin - Line joints can be miter, round, or bevel. Default is miter.

  The example below demonstrates the format of a configuration object for SetConfig() or for the constructor:

    var cfg = {shapes : [{type : Pol.VI.Shape.Polygon, strokeColor : '#ff0000', strokeWeight : '2px', strokeOpacity : 1.0, fillColor : '#ff0000', fillOpacity : 0.20},
    						{type : Pol.VI.Shape.Polyline, strokeColor : '#ffff00', strokeWeight : '1px', strokeOpacity : 1.0, fillColor : '#ff00ff', fillOpacity : 0.40},
    						{type : Pol.VI.Shape.Point, strokeColor : '#ffff00', strokeOpacity : 0.80}],
               altitudeMode : Pol.VI.AltitudeMode.AnchorToGround};
parameters
Object cfg The configuration object.
Pol.VI.Layer.GetConfig()
Get the configuration for the Layer object.
The fields in the returned configuration object are:

  shapes - An array of shape configuration objects.
  altitudeMode - Indicates how to treat altitude values. Default is AnchorToGround. See AltitudeMode

  Each element in the shapes configuration array contains these fields:

  type - Indicates the shape for this configuration.
  strokeColor - HTML color code for the line color. Default is #0000ff.
  strokeWeight - Width of the line in pixels. Default is 1px.
  strokeOpacity - Stroke Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  fillColor - HTML color code for the fill color. Default is no fill.
  fillOpacity - Fill Opacity value: 0.0 is transparent, 1.0 is opaque. Default is 1.0.
  strokeLinecap - Line caps can be butt, round, or square. Default is butt.
  strokeLinejoin - Line joints can be miter, round, or bevel. Default is miter.
returns
Object The configuration object.
Pol.VI.Layer.GetNumShapes()
Return the number of shapes in this layer.
returns
int Number of shapes.
Pol.VI.Layer.AddShape(type, points)
Add a shape to the layer.
parameters
Pol.VI.Shape type The shape type.
Array points The points defining the shape.
returns
string Identification handle for this shape.
Pol.VI.Layer.RemoveShape(id)
Remove a shape from the layer.
parameters
string id The identification handle for this shape.
returns
boolean true is shape was removed.
Pol.VI.Layer.ShowShape(id)
Show a shape in the layer.
parameters
string id The identification handle for this shape.
Pol.VI.Layer.HideShape(id)
Hide a shape in the layer.
parameters
string id The identification handle for this shape.
Pol.VI.Layer.GetArea(id, unit, cb)
Get the area of the shape defined by id
 See: Pol.VI.AreaResult for a description of the callback object.
parameters
string id Id of the shape within this layer.
Pol.VI.AreaUnits unit Unit of the computed area.
function cb Measurement callback function.
Pol.VI.Layer.GetDistance(id, unit, cb)
Get the distance along the shape defined by id
 See: Pol.VI.DistanceResult for a description of the callback object.
parameters
string id Id of the shape within this layer.
Pol.VI.DistanceUnits unit Unit of the computed distance.
function cb Measurement callback function.
Pol.VI.Layer.GetShapeId(x, y)
Return id of shape that contains the point x,y.
parameters
int x X-coordinate of target.
int y Y-coordinate of target.
returns
string The identification handle for the shape or null if not found.
Pol.VI.Feature.SetConfig(cfgs)
Set the configuration for the Feature object.

The optional configuration object specifies these fields:

Feature Configuration Object
Name Meaning Value
displaySet the display mode to Auto or Bounding Box.Default: Auto
pointThe configuration for point shapes.See Table Below
polylineThe configuration for polyline shapes.See Table Below
polygonThe configuration for polygon shapes.See Table Below
wfsDefines a non-Pictometry WFS service.See Table Below

The point, polyline and polygon configuration objects contain theses fields:

Shapes Configuration Object
Name Meaning Value
strokeColorHTML color code for line color.Default: #ff0000
strokeWeightWidth of the line in pixels.Default: 1
strokeOpacityLine opacity value: 0.0 is transparent, 1.0 is opaque.Default: 1.0
fillTurn fill on/off.Default: false
fillColorHTML color code for fill.Default: #0000ff
fillOpacityFill opacity value: 0.0 is transparent, 1.0 is opaque.Default: 0.50 (50%)

These fields are optional. Only specify the fields you wish to change, the others are defaulted.

NOTE: Setting fillColor or fillOpacity automatically turns the fill flag to true. It's only necessary to explicitly set the fill flag if you wish to use the default color and opacity or you wish to disable fill.

The wfs configuration object contains theses fields:

WFS Configuration Object
Name Meaning
serverThe URL of the WFS server. The server must support WFS version 1.1.0.
bboxThe coordinate pair order for the bounding box. Lat/Lng or Lng/Lat. See: Pol.VI.Feature.OrderBy
outputThe coordinate pair order for the geometry output. Lat/Lng or Lng/Lat. See: Pol.VI.Feature.OrderBy

NOTE: The wfs object is only necessary for non-POL WFS sources. All fields are required.

parameters
Object cfgs The configuration objects.
Pol.VI.Feature.GetConfig()
Get the configuration for the Feature object.

The fields in the returned configuration object are:

Feature Configuration Object
Name Meaning Value
displaySet the display mode to Auto or Bounding Box.Default: Auto
pointThe configuration for point shapes.See Table Below
polylineThe configuration for polyline shapes.See Table Below
polygonThe configuration for polygon shapes.See Table Below
wfsDefines a non-Pictometry WFS service.See Table Below

The point, polyline and polygon configuration objects contain theses fields:

Shapes Configuration Object
Name Meaning Value
strokeColorHTML color code for line color.Default: #ff0000
strokeWeightWidth of the line in pixels.Default: 1
strokeOpacityLine opacity value: 0.0 is transparent, 1.0 is opaque.Default: 1.0
fillTurn fill on/off.Default: false
fillColorHTML color code for fill.Default: #0000ff
fillOpacityFill opacity value: 0.0 is transparent, 1.0 is opaque.Default: 0.50 (50%)

The wfs configuration object contains theses fields:

WFS Configuration Object
Name Meaning
serverThe URL of the WFS server. The server must support WFS version 1.1.0.
bboxThe coordinate pair order for the bounding box. Lat/Lng or Lng/Lat. See: Pol.VI.Feature.OrderBy
outputThe coordinate pair order for the geometry output. Lat/Lng or Lng/Lat. See: Pol.VI.Feature.OrderBy
returns
Object Shape configuration objects.
Pol.VI.Feature.SetName(name)
Set the feature name.
parameters
string name The feature name.
Pol.VI.Feature.GetName()
Get the feature name.
returns
string The feature name.
Pol.VI.Feature.SetAutoLabel(onoff)
Set auto labeling on/off. Default is off.
parameters
boolean onoff True for auto label, false for none.
Pol.VI.Feature.GetAutoLabel(onoff)
Get Auto labeling status.
parameters
onoff
returns
boolean True for auto label, false for none.
Pol.VI.Feature.GetDescription(cb)
Get the feature description.
parameters
cb
returns
Object The feature description schema.
Clear the current features from view.
Pol.VI.Feature.SetBoundingBox(minx, miny, maxx, maxy)
Set the bounding box.
parameters
int minx Minimum image x-coordinate.
int miny Minimum image y-coordinate.
int maxx Maximum image x-coordinate.
int maxy Maximum image y-coordinate.
Pol.VI.Feature.SetDisplayMode(mode)
Set the display mode.
parameters
Pol.VI.Feature.Display mode Set the display mode.
Pol.VI.Feature.Query(x, y, names, cb)
Query the feature.
parameters
int x X-image coordinate.
int y Y-image coordinate.
Array of Strings names The names of the elements to return.
function cb Callback function.
returns
Object The data for the named elements.
Pol.VI.Feature.GetFeatureId(x, y)
Return id of feature that contains the point x,y.
parameters
int x X-coordinate of target.
int y Y-coordinate of target.
returns
string The identification handle for the feature or null if not found.
Pol.VI.Streets.SetConfig(cfgs)
Set the configuration for the Streets object.

The optional configuration object specifies these fields:

Streets Configuration Object
Name Meaning Value
autolabelAutomatically label street names.Default: true
strokeColorHTML color code for line color.Default: #ffffff
strokeWeightWidth of the line in pixels.Default: 10
strokeOpacityLine opacity value: 0.0 is transparent, 1.0 is opaque.Default: 0.7
fontColorHTML color code for font color.Default: #000000
fontFamilySets the font family.Default: Arial
fontSizeSets the font size.Default: 14px
fontWeightSets the font weight.Default: normal
fontStyleSets the font style.Default: normal
textOpacityText opacity value: 0.0 is transparent, 1.0 is opaque.Default: 1.0

These fields are optional. Only specify the fields you wish to change, the others are defaulted.

parameters
Object cfgs The configuration objects.
Pol.VI.Streets.GetConfig()
Get the configuration for the Streets object.
returns
Object Shape configuration objects.
Pol.VI.ImageNavigator.AddOverlay(shape)
Add an object to the overlay.
parameters
Object shape Shape object to add to the overlay.
Pol.VI.ImageNavigator.RemoveOverlay(shape)
Remove a shape from the overlay.
parameters
Object shape Shape object to remove from the overlay.
Pol.VI.ImageNavigator.RenderOverlay()
Render the overlay in the image viewer.
Pol.VI.ImageNavigator.ClearOverlay()
Clear all shapes from the overlay.
Pol.VI.ImageNavigator.ShowOverlay()
Show all shapes bound to the overlay.
Pol.VI.ImageNavigator.HideOverlay()
Hide all shapes bound to the overlay.
Pol.VI.ImageNavigator.ShowContourLines()
Show the contour lines on the image.

NOTE: This feature requires activation by Pictometry.

Pol.VI.ImageNavigator.HideContourLines()
Hide the contour lines.

NOTE: This feature requires activation by Pictometry.

Pol.VI.ImageNavigator.SetContourLinesCfg(cfg)
Set the configuration properties for displaying contour lines using cfg.
The configuration object contains these fields:

	units - Feet (Pol.VI.DistanceUnits.Feet) or Meters (Pol.VI.DistanceUnits.Meters).
	minor.width - Minor line width in pixels.
	minor.color - Minor line color.
	minor.increment - Minor line displayed every increment change in elevation.
	major.width - Major line width in pixels.
	major.color - Major line color.
	major.steps - Defines the number of minor lines between major lines.
	annotations.color - Defines the annotation color.
	annotations.spacing - Defines the spacing between annotations.

	These fields are optional. Only specify the fields you wish to change, the others are defaulted.
parameters
Object cfg The configuration object.
Pol.VI.ImageNavigator.GetContourLinesCfg()
Get the contour lines configuration properties.
The returned configuration object contains these fields:

	units - Feet (Pol.VI.DistanceUnits.Feet) or Meters (Pol.VI.DistanceUnits.Meters).
	minor.width - Minor line width in pixels.
	minor.color - Minor line color.
	minor.increment - Minor line displayed every increment change in elevation.
	major.width - Major line width in pixels.
	major.color - Major line color.
	major.steps - Defines the number of minor lines between major lines.
	annotations.color - Defines the annotation color.
	annotations.spacing - Defines the spacing between annotations.
returns
Object The configuration object.
Pol.VI.ImageNavigator.GetFeatureTypes(cb, server)
Request the supported features.
Each feature types object contains these fields:

	Name - The namespace qualified name of the feature type.
	Title - A human-readable title to briefly identify this feature type.
	DefaultSRS - Indicates which spatial reference system is used.
parameters
function cb Callback function.
string server (Optional) URL of the WFS server.
returns
Array of Objects The supported features.
Pol.VI.ImageNavigator.GetFeatureDescription(feature, cb, server)
Get the feature description.
parameters
string feature Feature name.
function cb Callback function.
string server (Optional) URL of the WFS server.
returns
Array of Strings An array of feature element names.
Objects
Pol.VI.Shape.Marker
properties
int Marker User-specified or default marker type.
Pol.VI.Shape.Element
properties
int Element User-specified HTML element type.
Pol.VI.Shape.Point
properties
int Point Point shape type.
Pol.VI.Shape.Polyline
properties
int Polyline Polyline shape type.
Pol.VI.Shape.Polygon
properties
int Polygon Polygon shape type.
Pol.VI.Shape.Circle
properties
int Circle Circle shape type.
Pol.VI.Shape.Text
properties
int Text Text shape type.
Pol.VI.Shape.Layer
properties
int Layer Layer shape type.
Pol.VI.Shape.Feature
properties
int Feature Feature shape type.
Pol.VI.Shape.Streets
properties
int Streets Streets shape type.
Pol.VI.OverlayShape

NOTE: This class is deprecated since version 1.0.3.9. You should now use Pol.VI.Shape.

properties
string title Text to display on mouseover.
properties
Icon icon Icon to use instead of the default.
properties
boolean draggable Determines whether marker can be dragged/dropped.
properties
boolean scalable Determines whether marker can be scaled.
Pol.VI.MarkerOptions.altitudeMode
properties
boolean altitudeMode Determines how altitude data is rendered.
properties
string id The unique identifier for the element.
properties
Size size The size of the element.
properties
string className The Cascading Style Sheet (CSS) class name to use.
properties
string innerHTML The data to display within the element. Can be plain text or HTML.
properties
int zIndex The z-index of the element. Default is 1.
properties
Pixel anchor How to anchor the element relative to the point. Default is to center the element.
properties
boolean altitudeMode Determines how altitude data is rendered.
properties
boolean isExportable Can the contents of this element be exported?
Pol.VI.Feature.Display
Feature display modes.
properties
int Auto Automatically display all features in the view.
int Bbox Display only those features within the defined bounding box.
Pol.VI.Feature.OrderBy
Feature coordinate order.
properties
int LatLng Coordinate order is latitude/longitude.
int LngLat Coordinate order is longitude/latitude.
Generated by JsDoc Toolkit 1.3.1 on Fri, 22 Oct 2010 14:18:56 GMT.