This library lets you add map resources accessible via
ESRI ArcGIS Server REST API into
Google Maps API V3 and provide some additional support for map tiles created
with different spatial reference and tiling scheme.
Create a Albers Equal-Area Conic Projection based Spatial Reference. The params passed in construction should
include the following properties: -wkid: well-known id
-semi_major: ellipsoidal semi-major axis in meter
-unit: meters per unit
-inverse_flattening: inverse of flattening of the ellipsoid where 1/f = a/(a - b)
-standard_parallel_1: phi1, latitude of the first standard parallel
-standard_parallel_2: phi2, latitude of the second standard parallel
-latitude_of_origin: phi0, latitude of the false origin
-central_meridian: lamda0, longitude of the false origin (with respect to the prime meridian)
-false_easting: FE, false easting, the Eastings value assigned to the natural origin
-false_northing: FN, false northing, the Northings value assigned to the natural origin
e.g.
var albers = new Albers({wkid:9999, semi_major: 6378206.4,inverse_flattening: 294.9786982,
standard_parallel_1: 29.5, standard_parallel_2: 45.5,
central_meridian: -96.0, latitude_of_origin: 23,false_easting: 0,
'false_northing': 0, unit: 1 });
This class represent the parameters needed in an buffer operation
for a GeometryService. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
bufferSpatialReference
SpatialReference
The well-known ID of or the SpatialReference of the buffer geometries
distances
Array.number
The distances the input geometries are buffered.
geometries
Array.OverlayView|Array.object
Array of google.maps.LatLng, Polyline, Polygon, or ESRI Geometry format to buffer.
If true, all geometries buffered at a given distance are unioned into a single (possibly multipart) polygon, and the unioned geometry is placed in the output array.
This class represent the parameters needed in an project operation
for a GeometryService.
There is no constructor, use JavaScript object literal.
Properties
Properties
Type
Description
geometries
Array.OverlayView|Array.object
Array of google.maps.LatLng, Polyline, Polygon, or ESRI Geometry format to project.
class Catalog
The catalog resource is the root node and initial entry point into an ArcGIS Server host.
This resource represents a catalog of folders and services published on the host.
Constructor
Constructor
Description
Catalog(url:String)
Create a ArcGIS service catalog instance using it's url: http://<host>/<instance>/rest/services
Properties
Properties
Type
Description
currentVersion
String
currentVersion
folders
Array.string
folders list
services
Array.string
list of services. Each has name, type property.
Events
Events
Arguments
Description
load
None
This event is fired when the catalog info is loaded.
class Config
This is an object literal that sets common configuration values used across the lib.
Properties
Properties
Type
Description
alwaysUseProxy
Boolean
whether to always use proxy page when send request to server.
proxyUrl
String
The URL to the web proxy page used in case the length of the URL request to an ArcGIS Server REST resource exceeds 2000 characters.
class CopyrightControl
put a copyright notice at bottom rigth corner.
Constructor
Constructor
Description
CopyrightControl(map:google.maps.Map)
Creates a copyright control
Methods
Methods
Return Value
Description
refresh()
None
refresh copyright text
class Error
Error returned from Server.
Syntax:
{
"error" :
{
"code" : 500,
"message" : "Object reference not set to an instance of an object.",
"details" : [
"'geometry' parameter is invalid"
]
}
}
class ExportMapOptions
This class represent the parameters needed in an exportMap operation for a MapService.
For more info see Export Operation. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
bounds
google.maps.LatLngBounds
bounds of map
dpi
Number
The dpi of the exported image, default 96
endTime
Date
The end time instant the exported map image if the service supports time (since AGS10).
time=<timeInstant> or time=<startTime>, <endTime>, e.g. time=1199145600000, 1230768000000 (1 Jan 2008 00:00:00 GMT to 1 Jan 2009 00:00:00 GMT)
format
String
The format of the exported image. png | png8 | png24 | jpg | pdf | bmp | gif | svg The default value is png.
height
Number
height of image, in pixel;
imageSR
SpatialReference
The well-known ID of the spatial reference of the exported image or instance of SpatialReference.
layerDefinitions
Object
Allows you to filter the features of individual layers in the exported map by specifying
definition expressions for those layers. Syntax: { "<layerId1>" : "<layerDef1>" , "<layerId2>" : "<layerDef2>" }
key is layerId returned by server, value is definition for that layer.
layerIds
Array.number
list of layer ids. If not specified along with layerOptions, show list of visible layers.
layerOptions
String
show | hide | include | exclude. If not specified with along layerIds, show list of visible layers.
layerTimeOptions
Object
layerTimeOptions The time options per layer. Users can indicate whether or not the layer should use the time extent
specified by the time parameter or not, whether to draw the layer
features cumulatively or not and the time offsets for the layer. Syntax:
{
"<layerId1>" : {
//If true, use the time extent specified by the time parameter
"useTime" : < true | false >,
//If true, draw all the features from the beginning of time for that data
"timeDataCumulative" : < true | false >,
//Time offset for this layer so that it can be overlaid on the top of a previous or future time period
"timeOffset" : <timeOffset1>,
"timeOffsetUnits" : "<esriTimeUnitsCenturies | esriTimeUnitsDays | esriTimeUnitsDecades |
esriTimeUnitsHours | esriTimeUnitsMilliseconds | esriTimeUnitsMinutes |
esriTimeUnitsMonths | esriTimeUnitsSeconds | esriTimeUnitsWeeks | esriTimeUnitsYears |
esriTimeUnitsUnknown>"
},
"<layerId2>" : {
"useTime" : < true | false >,
"timeDataCumulative" : < true | false >,
"timeOffsetOffset" : <timeOffset2>,
"timeOffsetUnits" : "<timeOffsetUnits2>"
}
}
time
Date
The time instant the exported map image if the service supports time (since AGS10).
transparent
Boolean
If true, the image will be exported with
the background color of the map set as its transparent color. note the REST API default value is false. The default value is true.
width
Number
width of image, in pixel;
class Feature
This class represent JSON feature object as returned by the REST API.
There is no constructor, use JavaScript object literal.
For more info see Feature Object.
Syntax:
This class represents a field in a Layer. It is accessed from
the fields property. There is no constructor for this class,
use Object Literal.
Properties
Properties
Type
Description
alias
String
field alias.
domain
Domain
domain
length
Int
length.
name
String
field Name
type
String
field type (esriFieldTypeOID|esriFieldTypeString|esriFieldTypeInteger|esriFieldTypeGeometry}.
class FindOptions
This class represent the parameters needed in an find operation for a MapService.
There is no constructor, use JavaScript object literal.
For more info see Find Operation. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
contains
Boolean
If false, the operation searches for an exact match of
the searchText string. An exact match is case sensitive.
Otherwise, it searches for a value that contains the searchText provided.
This search is not case sensitive. The default is true. The default value is true.
layerIds
Array.number
The layer Ids to perform the find operation on. The layers to perform the find operation on.
maxAllowableOffset
Number
This option can be used to specify the maximum allowable offset to be used for generalizing
geometries returned by the find operation
returnGeometry
Boolean
If true, the resultset will include the geometries associated with each result. The default value is true.
searchFields
Array.string
The names of the fields to search.
If this parameter is not specified, all fields are searched.
searchText
String
The search string. This is the text that is searched across the layers and the fields that the user specifies.
class FindResult
This class represent one entry in the results of a find operation for a MapService.
There is no constructor, use JavaScript object literal.
For more info see Find Operation.
This class represent the results of a find operation for a MapService.
There is no constructor, use JavaScript object literal.
For more info see Find Operation.
This class represent the parameters needed in a find address candidate operation
on a GeocodeService.
There is no constructor, use JavaScript object literal.
For more info see Find Adddress Candidates Operation. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
inputs
Object
an object literal with name-value pair of input values.
outFields
Array.string
The list of fields to be included in the returned resultset.
This class represent one entry in the results of a find address operation for a
GeocodeService.
There is no constructor, use JavaScript object literal.
For more info see Find Adddress Candidates Operation.
Properties
Properties
Type
Description
address
String
matched address
attributes
Object
attributes as name-value JSON object.
location
google.maps.LatLng
matched location
score
Number
matching score
class GeocodeResults
This class represent the results of an find address candidate operation for a
GeocodeService.
There is no constructor, use JavaScript object literal.
For more info see Find Adddress Candidates Operation.
Properties
Properties
Type
Description
candidates
Array.GeocodeResult
The find address results as
an array of GeocodeResult
class GeocodeService
This class (GeocodeService) represent an ArcGIS GeocodeServer
service.
Constructor
Constructor
Description
GeocodeService(url:String)
Creates a GeocodeService class.
Params:
url: URL of service, syntax: http://{catalogurl}/{serviceName}/GeocodeServer
Properties
Properties
Type
Description
addressFields
Array.Field
input fields.
Each entry is an object of type Field, plus required(true|false)
candidateFields
Array.Field
candidate Fields.
Each entry is an object of type Field
intersectionCandidateFields
Array.Field
intersectionCandidateFields
Each entry is an object of type Field
locatorProperties
Object
an object with key-value pair that is specific to Locator type.
The findAddressCandidates operation is performed on a geocode service
resource. The result of this operation is a resource representing
the list of address candidates. This resource provides information
about candidates including the address, location, and score.
param is an instance of GeocodeOptions. An instance of
GeocodeResults will be passed into callback function.
The reverseGeocode operation is The reverseGeocode operation is performed on a geocode service resource.
The result of this operation is a inverse geocoded address resource.
param is an instance of ReverseGeocodeOptions. An instance of
ReverseGeocodeResult will be passed into callback function.
Events
Events
Arguments
Description
load
None
This event is fired when the service and it's service info is loaded.
class Geographic
This class (Geographic) will simply retuns same LatLng as Coordinates.
The param should have wkid property. Any Geographic Coordinate Systems (eg. WGS84(4326)) can
use this class As-Is.
Note: This class does not support datum transformation. This class extends SpatialReference.
Constructor
Constructor
Description
Geographic(params:Object)
Creates a Geographic Coordinate System. e.g.: var g2 = new Geographic({wkid:4326});
class GeometryService
This class (GeometryService) represent an ArcGIS
Geometry
service.
Constructor
Constructor
Description
GeometryService(url:String)
Creates an GeometryService class.
Params:
url: URL of service, syntax: http://{catalogurl}/{serviceName}/GeometryServer
This resource projects an array of input geometries from an input spatial reference
to an output spatial reference. Result of type BufferResults is passed in callback function.
This resource projects an array of input geometries from an input spatial reference
to an output spatial reference. Result of type ProjectResults is passed in callback function.
class GeometryType
List of Geometry type supported by ArcGIS server.
Properties
Properties
Type
Description
ENVELOPE
String
esriGeometryEnvelope
MULTIPOINT
String
esriGeometryMultipoint
POINT
String
esriGeometryPoint
POLYGON
String
esriGeometryPolygon
POLYLINE
String
esriGeometryPolyline
class GPService
GPService
Properties
Properties
Type
Description
executionType
String
resultMapServerName
String
serviceDescription
String
tasks
Array.string
Events
Events
Arguments
Description
load
None
This event is fired when the service and it's service info is loaded.
This class represent the parameters needed in an identify operation for a MapService.
There is no constructor, use JavaScript object literal.
For more info see Identify Operation. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
bounds
google.maps.LatLngBounds
The bounding box of the map currently being viewed.
dpi
Number
dpi of image, default 96;
geometry
Geometry
The geometry to identify on, google.maps.LatLng, Polyline, or Polygon.
height
Number
height of image in pixel
layerIds
Array.number
The layers to perform the identify operation on.
layerOption
String
The layers to perform the identify operation on. 'top|visible|all'.
maxAllowableOffset
Number
This option can be used to specify the maximum allowable offset to be used for generalizing geometries returned by the identify operation
If true, the resultset will include the geometries associated with each result. The default value is true.
tolerance
Number
The distance in screen pixels from the specified geometry within which the identify should be performed
width
Number
width of image in pixel
class IdentifyResult
This class represent one entry in the results of an identify operation for a MapService.
There is no constructor, use JavaScript object literal.
For more info see Identify Operation.
This class represent the results of an identify operation for
a MapService.
There is no constructor, use JavaScript object literal.
For more info see Identify Operation.
Create a Lambert Conformal Conic Projection based Spatial Reference. The params passed in construction should
include the following properties: -wkid: well-known id
-semi_major: ellipsoidal semi-major axis in meter
-unit: meters per unit
-inverse_flattening: inverse of flattening of the ellipsoid where 1/f = a/(a - b)
-standard_parallel_1: phi1, latitude of the first standard parallel
-standard_parallel_2: phi2, latitude of the second standard parallel
-latitude_of_origin: phi0, latitude of the false origin
-central_meridian: lamda0, longitude of the false origin (with respect to the prime meridian)
-false_easting: FE, false easting, the Eastings value assigned to the natural origin
-false_northing: FN, false northing, the Northings value assigned to the natural origin
e.g. North Carolina State Plane NAD83 Feet: var ncsp82 = new LambertConformalConic({wkid:2264, semi_major: 6378137.0,inverse_flattening: 298.257222101,
standard_parallel_1: 34.33333333333334, standard_parallel_2: 36.16666666666666,
central_meridian: -79.0, latitude_of_origin: 33.75,false_easting: 2000000.002616666,
'false_northing': 0, unit: 0.3048006096012192 });
The query operation is performed on a layer resource. The result of this operation is a resultset resource that will be
passed in the callback function. param is an instance of QueryOptions For more info see Query Operation.
The query related records operation is performed on a layer / table resource.
The result of this operation are featuresets grouped by source layer / table
object IDs. Each featureset contains Feature objects including the values for
the fields requested by the user. For related layers, if you request geometry
information, the geometry of each feature is also returned in the featureset.
For related tables, the featureset does not include geometries.
Events
Events
Arguments
Description
load
None
This event is fired when layer's service info is loaded.
class LOD
This class contains information about one "Level Of Detail" for a cached map service.
It is the type of lods property of TileInfo There is no constructor for this class. Use as object literal.
Properties
Properties
Type
Description
level
Number
zoom level.
resolution
Number
map unit per pixel
scale
Number
actual map scale. e.g a value of 5000 means 1:5000 scale.
class MapImage
This is the result of MapService.exportMap operation.
There is no constructor, use as JavaScript object literal.
Properties
Properties
Type
Description
bounds
google.maps.LatLngBounds
The bounding box of the exported image.
height
Number
height of the exported image.
href
String
URL of image
scale
Number
scale of the exported image.
width
Number
width of the exported image.
class MapOverlay
This class (MapOverlay) extends the Google Maps API's
OverlayView
that draws map images from data source on the fly. It is also known as "Dynamic Maps".
It can be added to the map via setMap(map) method.
The similar class in the core Map API is google.maps.GroundOverlay,
however, the instance of this class always cover the viewport exactly, and will redraw itself as map moves.
Creates an Map Overlay using url of the map service and optional MapOverlayOptions.
service (required) is url of the underline MapService or the MapService itself.
opt_overlayOpts (optional) is an instance of MapOverlayOptions.
Methods
Methods
Return Value
Description
draw()
None
Called by API not by app code.
See OverlayView.draw in core API docs.
Check if the overlay is visible, and within zoomzoom range and current map bounds intersects with it's fullbounds.
onAdd()
None
Called by API not by app code.
Handler when overlay is added. Interface method.
This will be called after setMap(map) is called.
onRemove()
None
Called by API not by app code.
Handler when overlay is removed.
refresh()
None
Refresh the map image in current view port.
setOpacity(opacity:Number)
None
Sets Image Opacity. parameter opacity between 0-1.
show()
None
Makes the overlay visible.
Events
Events
Arguments
Description
drawend
None
This event is fired after the the drawing request was returned by server.
drawstart
None
This event is fired before the the drawing request was sent to server.
class MapOverlayOptions
Instance of this class are used in the opt_ovelayOpts argument
to the constructor of the MapOverlay class. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Opacity of map image from 0.0 (invisible) to 1.0 (opaque) The default value is 1.0.
class MapSerivceOptions
provides options to construct a MapService There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
delayLoad
Number
number of seconds to delay loading meta data on construction.
class MapService
This class (MapService) is the core class for all map service operations.
It represents an ArcGIS Server map service that offer access to map and layer content
Constructor
Constructor
Description
MapService(url:String)
Creates a MapService objects that can be used by UI components.
url (required) is the URL of the map servive, e.g.
http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Specialty/ESRI_StateCityHighway_USA/MapServer.
Note the spatial reference of the map service must already exists
in the spatialReferences_ if actual coordinates transformation is needed.
Properties
Properties
Type
Description
copyrightText
String
copyrightText
description
String
description
documentInfo
Object
Object with the folloing properties: Title, Author,Comments,Subject,Category,Keywords
Export an image with given parameters.
For more info see Export Operation.
The params is an instance of ExportMapOptions.
The following properties will be set automatically if not specified:...
The callback is the callback function with argument of
an instance of MapImage.
Instance of this class are used in the opt_typeOpts argument
to the constructor of the MapType class. See
google.maps.MapType. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
alt
String
Alt text to display when this MapType's button is hovered over in the MapTypeControl. Optional.
maxZoom
Number
The maximum zoom level for the map when displaying this MapType. Required for base MapTypes, ignored for overlay MapTypes.
minZoom
Number
The minimum zoom level for the map when displaying this MapType. Optional; defaults to 0.
This event is fired when the service and it's service info is loaded.
class OverlayOptions
Instance of this classes that specify how
the geometry features returned by ArcGIS server should be rendered in the browser. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
This class (Projection) implements a custom
google.maps.Projection
from the core Google Maps API.
It includes a real SpatialReference object to convert LatLng from/to
map coordinates, and tiling scheme informations to convert
map coordinates from/to pixel coordinates.
Constructor
Constructor
Description
Projection(tileInfo:TileInfo)
Creates an ArcGIS Map Tiling Reference System.
tileInfo tiling information. An instance of TileInfo
Applications normally do not create instances of this class directly.
This class represent the parameters needed in an project operation
for a GeometryService.
There is no constructor, use JavaScript object literal.
For more info see Project Operation. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
geometries
Array.OverlayView|Array.object
Array of google.maps.LatLng, Polyline, Polygon, or ESRI Geometry format to project.
The well-known ID of or the SpatialReference of the input geometries
outSpatialReference
SpatialReference
The well-known ID of or the SpatialReference of the out geometries
class ProjectResults
This class represent the parameters needed in an project operation
for a GeometryService.
There is no constructor, use JavaScript object literal.
For more info see Project Operation.
Properties
Properties
Type
Description
geometries
Array.OverlayView|Array.object
Array of google.maps.LatLng, Polyline, Polygon, or ESRI Geometry format to project.
class QueryOptions
This class represent the parameters needed in an query operation for a Layer.
There is no constructor, use JavaScript object literal.
For more info see Query Operation. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
geometry
OverlayView|Array.OverlayView
The geometry to apply as the spatial filter.
maxAllowableOffset
Number
This option can be used to specify the maximum allowable offset to be used for generalizing geometries returned by the query operation
objectIds
Array.number
The object IDs of this layer / table to be queried
outFields
Array.string
The list of fields to be included in the returned resultset.
If true, If true, the resultset will include the geometries associated with each result.
returnIdsOnly
Boolean
If true, the response only includes an array of object IDs. Otherwise the response is a feature set. The default is false.
spatialRelationship
SpatialRelationship
The spatial relationship to be applied on the
input geometry while performing the query. The supported spatial relationships
include intersects, contains, envelope intersects, within, etc.
The default spatial relationship is intersects. See SpatialRelationship
text
String
A literal search text. If the layer has a display field
associated with it, the server searches for this text in this field.
This parameter is a short hand for a where clause of:
where [displayField]like '%[text]%'. The text is case sensitive.
This parameter is ignored if the where parameter is specified.
where
String
A where clause for the query filter. Any legal SQL where clause operating on the fields in the layer is allowed.
class QueryRelatedRecordsOptions
This class represent the parameters needed in an query related records operation for a Layer.
For more info see Query Related Records Operation. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
definitionExpression
String
The definition expression to be applied to the related table / layer. From the list of objectIds, only those records that conform to this expression will be returned.
Number
[maxAllowableOffset] This option can be used to specify the maximum allowable offset to be used for generalizing geometries returned by the query operation
objectIds
Array.number
The object IDs of this layer / table to be queried
outFields
Array.string
The list of fields to be included in the returned resultset. This list is a comma delimited list of field names.
outSR
Number
The well-known ID of or the SpatialReference of the output geometries
relatioshipId
Int
The ID of the relationship to be queried
returnGeometry
Boolean
If true, the resultset will include the geometries associated with each result. The default value is true.
class RelatedRecord
This class represent the result of an query related records operation for a Layer.
There is no constructor, use JavaScript object literal.
For more info see Query Operation.
This class represent the results of an query operation for a Layer.
There is no constructor, use JavaScript object literal.
For more info see Query Operation.
This class represent the parameters needed in a reverseGeocode operation
on a GeocodeService.
There is no constructor, use JavaScript object literal.
For more info see Reverse Geocode Operation. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
distance
Number
The distance in meters from the given location within which
a matching address should be searched.
location
google.maps.LatLng
an object literal of LatLng.
class ReverseGeocodeResult
This class represent one entry in the results of a find address operation for a
GeocodeService.
There is no constructor, use JavaScript object literal.
For more info see Reverse Geocode Operation.
Properties
Properties
Type
Description
address
Object
matched address, object literal with name-value address parts.
location
google.maps.LatLng
matched location
class RouteOptions
intance that specify how a route should be solved. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
barriers
Array.google.maps.LatLng|Array.Marker
the locations the route must avoid
findBestSequence
Boolean
If true, the solver should resequence the route in the optimal order. The default is as defined in the network layer.
preserveFirstStop
Boolean
If true, the solver should resequence the route in the optimal order. The default is as defined in the network layer.
preserveLastStop
Boolean
If true, the solver should resequence the route in the optimal order. The default is as defined in the network layer.
returnDirections
Boolean
If true, directions will be generated and returned with the analysis results. Default is true
returnRoutes
Boolean
If true, routes will be returned with the analysis results. Default is true.
stops
Array.google.maps.LatLng|Array.Marker
the locations the route must pass
class RouteResults
intance that specify the results of the solve operation.
Properties
Properties
Type
Description
stops
Array.google.maps.LatLng
class RouteTask
This class (RouteTask) represent a Network Layer resource deployed in a NetWorkService.
It can solve a route based on stops, barrier
Constructor
Constructor
Description
RouteTask(url:String)
Create a route task with the URL of the routing server resource.
Solve a route based on inputs such as stops and barriers. Result of type RouteResults
is passed to Function callback, and error of type Error is passed to Function errback.
Create A Generic Spatial Reference Object
The params passed in constructor is a javascript object literal and depends on
the type of Coordinate System to construct.
Properties
Properties
Type
Description
wkid
Number
well-known coodinate system id (EPSG code)
wkt
String
well-known coodinate system text
Methods
Methods
Return Value
Description
forward(lnglat:Array.number)
Array.number
Convert Lat Lng to real-world coordinates.
Note both input and output are array of [x,y], although their values in different units.
getCircum()
number
Get the map the periodicity in x-direction, in map units NOT pixels
inverse(coords:Array.number)
Array.number
Convert real-world coordinates to Lat Lng.
Note both input and output are are array of [x,y], although their values are different.
toJSON()
To JSON String
class SpatialRelationship
This is actually a list of constants that represent spatial
relationship types.
Properties
Properties
Type
Description
CONTAINS
String
esriSpatialRelContains
CROSSES
String
esriSpatialRelCrosses
ENVELOPE_INTERSECTS
String
esriSpatialRelEnvelopeIntersects
INDEX_INTERSECTS
String
esriSpatialRelIndexIntersects
INTERSECTS
String
esriSpatialRelIntersects
OVERLAPS
String
esriSpatialRelOverlaps
TOUCHES
String
esriSpatialRelTouches
WITHIN
String
esriSpatialRelWithin
class SphereMercator
This class (SphereMercator) is the Projection Default Google Maps uses. It is a special form of Mercator. This class extends SpatialReference.
Constructor
Constructor
Description
SphereMercator(params:Object)
Creates a Spatial Reference based on Sphere Mercator Projection.
The params passed in constructor should have the following properties:
-wkid: wkid
-semi_major: ellipsoidal semi-major axis
-unit: meters per unit
-central_meridian: lamda0, longitude of the false origin (with respect to the prime meridian)
e.g. The "Web Mercator" used in ArcGIS Server: var web_mercator = new SphereMercator({wkid: 102113, semi_major:6378137.0, central_meridian:0, unit: 1 });
This class (TileLayer) provides access to a cached ArcGIS Server
map service. There is no GTileLayer class in Google Maps API V3, this class is kept to allow
finer control of zoom levels for each individual tile sets within a map type, such as zoom level range and opacity.
Creates a tile layer from a cached by ArcGIS map service.
service (required) is the underline MapService opt_layerOpts (optional) is an instance of TileLayerOptions.
Instances of this class are used in the opt_layerOpts argument
to the constructor of the TileLayer class. There is no constructor for this class. Instead, this class is instantiated as a javascript object literal.
Properties
Properties
Type
Description
hosts
String
host pattern of tile servers if they are numbered. Most browser
has default restrictions on how many concurrent connections can be made to
a single host. One technique to workaround this is to create multiple hosts and rotate them when
loading tiles.
The syntax is prefix[numberOfHosts]suffix, for example, "mt[4].google.com" means
rotate hosts in mt0.google.com, mt1.google.com, mt2.google.com, mt3.google.com (4 hosts).
Create a Transverse Mercator Projection. The params passed in constructor should contain the
following properties: -wkid: well-known id
-semi_major: ellipsoidal semi-major axis in meters
-unit: meters per unit
-inverse_flattening: inverse of flattening of the ellipsoid where 1/f = a/(a - b)
-Scale Factor: scale factor at origin
-latitude_of_origin: phi0, latitude of the false origin
-central_meridian: lamda0, longitude of the false origin (with respect to the prime meridian)
-false_easting: FE, false easting, the Eastings value assigned to the natural origin
-false_northing: FN, false northing, the Northings value assigned to the natural origin
e.g. Georgia West State Plane NAD83 Feet:
var gawsp83 = new TransverseMercator({wkid: 102667, semi_major:6378137.0,
inverse_flattening:298.257222101,central_meridian:-84.16666666666667, latitude_of_origin: 30.0,
scale_factor:0.9999, false_easting:2296583.333333333, false_northing:0, unit: 0.3048006096012192});
static method. Call with Syntax SpatialReference.register(..).
Add A Spatial Reference to the internal collection of Spatial References.
the wktOrSR parameter can be String format of "well-known text" of the
Spatial Reference, or an instance of SpatialReference.
If passes in String WKT format, to be consistent, it should use the same format as listed
in
ESRI documentation. For example, add NC State Plane NAD83 as String:
SpatialReference.register(2264,'PROJCS["NAD_1983_StatePlane_North_Carolina_FIPS_3200_Feet",
GEOGCS["GCS_North_American_1983",
DATUM["D_North_American_1983",
SPHEROID["GRS_1980",6378137.0,298.257222101]],
PRIMEM["Greenwich",0.0],
UNIT["Degree",0.0174532925199433]],
PROJECTION["Lambert_Conformal_Conic"],
PARAMETER["False_Easting",2000000.002616666],
PARAMETER["False_Northing",0.0],
PARAMETER["Central_Meridian",-79.0],
PARAMETER["Standard_Parallel_1",34.33333333333334],
PARAMETER["Standard_Parallel_2",36.16666666666666],
PARAMETER["Latitude_Of_Origin",33.75],
UNIT["Foot_US",0.3048006096012192]]');
Note: only Lambert Conformal Conic and Transverse Mercator Projection
based Spatial References are supported if added via WKT String.
If passes in an instance of SpatialReference, it can be one of the
built in classes, or a class that extends SpatialReference. For example, add NC State Plane NAD83 as SR:
SpatialReferences.register(2264: new LambertConformalConic({
wkid: 2264,
semi_major: 6378137.0,
inverse_flattening: 298.257222101,
standard_parallel_1: 34.33333333333334,
standard_parallel_2: 36.16666666666666,
central_meridian: -79.0,
latitude_of_origin: 33.75,
'false_easting': 2000000.002616666,
'false_northing': 0,
unit: 0.3048006096012192
});