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.
Constructors
Base class for Image Navigator shape objects.
This class should NEVER be directly instantiated.
The methods below are common to all shapes.
methods
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
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)
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)
parameters
|
LatLng
|
points
|
Latitude and Longitude. (Required)
|
|
ElementOptions
|
cfg
|
Element configuration options.
|
methods
Pol.VI.Point(
points, cfg)
parameters
|
LatLng
|
points
|
Latitude and Longitude.
|
|
Object
|
cfg
|
(Optional) The configuration object. See: SetConfig
|
methods
Pol.VI.Polyline(
points, cfg)
parameters
|
Array of LatLng
|
points
|
Array of vertices.
|
|
Object
|
cfg
|
(Optional) The configuration object. See: SetConfig
|
methods
Pol.VI.Polygon(
points, cfg)
parameters
|
Array of LatLng
|
points
|
Array(s) of vertices.
|
|
Object
|
cfg
|
(Optional) The configuration object. See: SetConfig
|
methods
Pol.VI.Circle(
point, cfg)
parameters
|
Object
|
point
|
Contains center point and radius point lat/lng.
|
|
Object
|
cfg
|
(Optional) The configuration object. See: SetConfig
|
methods
parameters
|
LatLng
|
points
|
Latitude and Longitude.
|
|
Object
|
cfg
|
(Optional) The configuration object. See: SetConfig
|
methods
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
Set the configuration for the Shape object.
parameters
|
Object
|
cfg
|
The configuration object.
|
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.
Returns true if the shape is visible.
Set the shape id.
parameters
Return the coordinate points for the shape.
returns
|
LatLng or Array of LatLng
|
The shape coordinates.
|
Set new coordinate points for the shape.
parameters
|
LatLng or Array of LatLng
|
points
|
The shape coordinates.
|
Returns true iff width and height are equal to other.
parameters
Returns a string that contains the x and y pixels coordinates, separated by a comma.
Returns true iff width and height are equal to other.
parameters
Returns a string that contains the width and height, separated by a comma.
Set a new latitude/longitude.
parameters
|
float
|
lat
|
Point latitude.
|
|
float
|
lng
|
Point longitude.
|
|
float
|
alt
|
(Optional) Point altitude in meters.
|
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.
|
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.
|
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.
|
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.
|
Convert from degrees to radians.
parameters
returns
|
float
|
Degrees in radians.
|
Convert from radians to degrees.
parameters
returns
|
float
|
Radians in degrees.
|
Convert object to a string representation.
returns
|
string
|
A string that contains the lat/lng/alt coordinates, separated by a comma.
|
Set the configuration for the Marker object.
parameters
|
MarkerOptions
|
cfg
|
(Optional) The configuration object. See: MarkerOptions
|
Get the configuration for the Marker object.
returns
|
MarkerOptions
|
The configuration object.
|
Set drag/drop to on or off.
parameters
|
boolean
|
onoff
|
True for drag on, false for drag off.
|
Is marker draggable?
returns
|
boolean
|
True if marker is draggable, false otherwise.
|
Set the configuration for the Element object.
parameters
|
ElementOptions
|
cfg
|
(Optional) The configuration object. See: ElementOptions
|
Get the configuration for the Element object.
returns
|
ElementOptions
|
The configuration object.
|
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.
|
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.
|
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.
|
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.
|
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.
|
Clear all text annotations for the polygon.
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.
|
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.
|
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.
|
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.
|
Clear all text annotations for the polygon.
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
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.
|
Set text for the object.
parameters
|
string
|
text
|
Text string to add to the object.
|
Get the element text.
returns
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.
|
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.
|
Return the number of shapes in this layer.
returns
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.
|
Remove a shape from the layer.
parameters
|
string
|
id
|
The identification handle for this shape.
|
returns
|
boolean
|
true is shape was removed.
|
Show a shape in the layer.
parameters
|
string
|
id
|
The identification handle for this shape.
|
Hide a shape in the layer.
parameters
|
string
|
id
|
The identification handle for this shape.
|
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.
|
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.
|
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.
|
Set the configuration for the Feature object.
The optional configuration object specifies these fields:
Feature Configuration Object
| Name |
Meaning |
Value |
| display | Set the display mode to Auto or Bounding Box. | Default: Auto |
| point | The configuration for point shapes. | See Table Below |
| polyline | The configuration for polyline shapes. | See Table Below |
| polygon | The configuration for polygon shapes. | See Table Below |
| wfs | Defines a non-Pictometry WFS service. | See Table Below |
The point, polyline and polygon configuration objects contain theses fields:
Shapes Configuration Object
| Name |
Meaning |
Value |
| strokeColor | HTML color code for line color. | Default: #ff0000 |
| strokeWeight | Width of the line in pixels. | Default: 1 |
| strokeOpacity | Line opacity value: 0.0 is transparent, 1.0 is opaque. | Default: 1.0 |
| fill | Turn fill on/off. | Default: false |
| fillColor | HTML color code for fill. | Default: #0000ff |
| fillOpacity | Fill 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 |
| server | The URL of the WFS server. The server must support WFS version 1.1.0. |
| bbox | The coordinate pair order for the bounding box. Lat/Lng or Lng/Lat. See: Pol.VI.Feature.OrderBy |
| output | The 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.
|
Get the configuration for the Feature object.
The fields in the returned configuration object are:
Feature Configuration Object
| Name |
Meaning |
Value |
| display | Set the display mode to Auto or Bounding Box. | Default: Auto |
| point | The configuration for point shapes. | See Table Below |
| polyline | The configuration for polyline shapes. | See Table Below |
| polygon | The configuration for polygon shapes. | See Table Below |
| wfs | Defines a non-Pictometry WFS service. | See Table Below |
The point, polyline and polygon configuration objects contain theses fields:
Shapes Configuration Object
| Name |
Meaning |
Value |
| strokeColor | HTML color code for line color. | Default: #ff0000 |
| strokeWeight | Width of the line in pixels. | Default: 1 |
| strokeOpacity | Line opacity value: 0.0 is transparent, 1.0 is opaque. | Default: 1.0 |
| fill | Turn fill on/off. | Default: false |
| fillColor | HTML color code for fill. | Default: #0000ff |
| fillOpacity | Fill 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 |
| server | The URL of the WFS server. The server must support WFS version 1.1.0. |
| bbox | The coordinate pair order for the bounding box. Lat/Lng or Lng/Lat. See: Pol.VI.Feature.OrderBy |
| output | The coordinate pair order for the geometry output. Lat/Lng or Lng/Lat. See: Pol.VI.Feature.OrderBy |
returns
|
Object
|
Shape configuration objects.
|
Set the feature name.
parameters
|
string
|
name
|
The feature name.
|
Get the feature name.
returns
Set auto labeling on/off. Default is off.
parameters
|
boolean
|
onoff
|
True for auto label, false for none.
|
Get Auto labeling status.
parameters
returns
|
boolean
|
True for auto label, false for none.
|
Get the feature description.
parameters
returns
|
Object
|
The feature description schema.
|
Clear the current features from view.
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.
|
Set the display mode.
parameters
|
Pol.VI.Feature.Display
|
mode
|
Set the display mode.
|
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.
|
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.
|
Set the configuration for the Streets object.
The optional configuration object specifies these fields:
Streets Configuration Object
| Name |
Meaning |
Value |
| autolabel | Automatically label street names. | Default: true |
| strokeColor | HTML color code for line color. | Default: #ffffff |
| strokeWeight | Width of the line in pixels. | Default: 10 |
| strokeOpacity | Line opacity value: 0.0 is transparent, 1.0 is opaque. | Default: 0.7 |
| fontColor | HTML color code for font color. | Default: #000000 |
| fontFamily | Sets the font family. | Default: Arial |
| fontSize | Sets the font size. | Default: 14px |
| fontWeight | Sets the font weight. | Default: normal |
| fontStyle | Sets the font style. | Default: normal |
| textOpacity | Text 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.
|
Get the configuration for the Streets object.
returns
|
Object
|
Shape configuration objects.
|
Add an object to the overlay.
parameters
|
Object
|
shape
|
Shape object to add to the overlay.
|
Remove a shape from the overlay.
parameters
|
Object
|
shape
|
Shape object to remove from the overlay.
|
Render the overlay in the image viewer.
Clear all shapes from the overlay.
Show all shapes bound to the overlay.
Hide all shapes bound to the overlay.
Show the contour lines on the image.
NOTE: This feature requires activation by Pictometry.
Hide the contour lines.
NOTE: This feature requires activation by Pictometry.
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.
|
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.
|
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.
|
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
properties
|
int
|
Marker
|
User-specified or default marker type.
|
properties
|
int
|
Element
|
User-specified HTML element type.
|
properties
|
int
|
Point
|
Point shape type.
|
properties
|
int
|
Polyline
|
Polyline shape type.
|
properties
|
int
|
Polygon
|
Polygon shape type.
|
properties
|
int
|
Circle
|
Circle shape type.
|
properties
|
int
|
Text
|
Text shape type.
|
properties
|
int
|
Layer
|
Layer shape type.
|
properties
|
int
|
Feature
|
Feature shape type.
|
properties
|
int
|
Streets
|
Streets shape type.
|
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.
|
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?
|
Feature display modes.
properties
|
int
|
Auto
|
Automatically display all features in the view.
|
|
int
|
Bbox
|
Display only those features within the defined bounding box.
|
Feature coordinate order.
properties
|
int
|
LatLng
|
Coordinate order is latitude/longitude.
|
|
int
|
LngLat
|
Coordinate order is longitude/latitude.
|