new map(arg) → {geo.map}
Parameters:
Name | Type | Description |
---|---|---|
arg |
geo.map.spec | Map specification |
Returns:
- Type
- geo.map
Extends
Members
idle
- Description:
Getter for the idle state. Read only.
- Source:
- Inherited From:
Properties:
Name | Type | Description |
---|---|---|
idle |
boolean |
|
Getter for the idle state. Read only.
Methods
addChild(child) → {this}
- Description:
Add a child (or an array of children) to the object.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
child |
geo.object | Array.<geo.object> | A child object or array of child objects. |
Returns:
- Type
- this
addPromise(promise) → {this}
- Description:
Add the promise here and also propagate up the scene tree.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
promise |
Promise | A promise object. |
Returns:
- Type
- this
allowRotation(allowRotationopt) → {boolean|function|this}
- Description:
Get/set the
allowRotation
setting. If changed, adjust the map as needed.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
allowRotation |
boolean | function |
<optional> |
The new |
Returns:
- Type
- boolean | function | this
animationQueue(queueopt) → {array|this}
- Description:
Get/set the animation queue. Two maps can share a single animation queue to ensure synchronized animations. When setting, the animation queue will merge values from the existing queue into the new queue.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
queue |
array |
<optional> |
The animation queue to use. |
Returns:
The current animation queue or the current map.
- Type
- array | this
autoResize(autoResizeopt) → {boolean|this}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
autoResize |
boolean |
<optional> |
Truthy to automatically resize the map when the size of the browser window changes. |
Returns:
The current state of autoResize or the current map.
- Type
- boolean | this
autoshareRenderer(argopt) → {boolean|string|this}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
boolean | string | null |
<optional> |
If specified, the new value for
autoshareRender that gets passed to created layers. |
Returns:
- Type
- boolean | string | this
bounds(bdsopt, gcsopt) → {geo.geoBounds}
- Description:
Get/set the locations of the current map edges. When set, the left-top and right-bottom corners are transformed to the map's gcs and then used to set the bounds.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
bds |
geo.geoBounds |
<optional> |
The requested map bounds. |
gcs |
string | geo.transform | null |
<optional> |
|
Returns:
The actual new map bounds.
- Type
- geo.geoBounds
boundsFromZoomAndCenter(zoom, center, rotation, gcsopt, ignoreDiscreteZoomopt, ignoreClampBoundsopt) → {geo.geoBounds}
- Description:
Get the bounds that will be displayed with the given zoom and center.
Note: the bounds may not have the requested zoom and center due to map restrictions.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
zoom |
number | The requested zoom level. |
|
center |
geo.geoPosition | The requested center. |
|
rotation |
number | The requested rotation in clockwise radians. |
|
gcs |
string | geo.transform | null |
<optional> |
|
ignoreDiscreteZoom |
boolean |
<optional> |
If |
ignoreClampBounds |
boolean |
<optional> |
If |
Returns:
- Type
- geo.geoBounds
camera() → {geo.camera}
Returns:
- Type
- geo.camera
center(coordinates, gcsopt, ignoreDiscreteZoomopt, ignoreClampBoundsopt) → {geo.geoPosition|this}
- Description:
Get or set the center of the map in the given geographic coordinates.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
coordinates |
geo.geoPosition | If specified, the new center of the map. |
|
gcs |
string | geo.transform | null |
<optional> |
|
ignoreDiscreteZoom |
boolean |
<optional> |
If |
ignoreClampBounds |
boolean | 'limited' |
<optional> |
If |
Fires:
Returns:
- Type
- geo.geoPosition | this
children() → {Array.<geo.object>}
- Description:
Get an array of the child objects.
- Source:
- Inherited From:
Returns:
A copy of the array of child objects.
- Type
- Array.<geo.object>
clampBoundsX(clampopt) → {boolean|this}
- Description:
Get/set the
clampBoundsX
setting. If changed, adjust the bounds of the map as needed.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
clamp |
boolean |
<optional> |
The new clamp value. |
Returns:
- Type
- boolean | this
clampBoundsY(clampopt) → {boolean|this}
- Description:
Get/set the
clampBoundsY
setting. If changed, adjust the bounds of the map as needed.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
clamp |
boolean |
<optional> |
The new clamp value. |
Returns:
- Type
- boolean | this
clampZoom(clampopt) → {boolean|this}
- Description:
Get/set the
clampZoom
setting. If changed, adjust the bounds of the map as needed.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
clamp |
boolean |
<optional> |
The new clamp value. |
Returns:
- Type
- boolean | this
createLayer(layerName, arg) → {geo.layer}
Parameters:
Name | Type | Description |
---|---|---|
layerName |
string | The type of layer to add to the map. |
arg |
object | Parameters for the new layer. |
Fires:
Returns:
- Type
- geo.layer
deleteLayer(layernullable) → {geo.layer}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
layer |
geo.layer |
<nullable> |
Layer to remove from the map. |
Fires:
Returns:
- Type
- geo.layer
discreteZoom(discreteZoomopt) → {boolean|this}
- Description:
Get/set the discrete zoom flag. If
true
, the map will snap to integer zoom levels.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
discreteZoom |
boolean |
<optional> |
If specified, the new discrete zoom flag. |
Returns:
The current discrete zoom flag or the map object.
- Type
- boolean | this
displayToGcs(c, gcsopt) → {geo.geoPosition|Array.<geo.geoPosition>}
- Description:
Convert from display to gcs coordinates. This is identical to calling
displayToWorld
and thenworldToGcs
.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
c |
geo.screenPosition | Array.<geo.screenPosition> | The input display coordinate to convert. |
|
gcs |
string | geo.transform | null |
<optional> |
Output gcs. |
Returns:
GCS space coordinates.
- Type
- geo.geoPosition | Array.<geo.geoPosition>
displayToWorld(c) → {geo.worldPosition|Array.<geo.worldPosition>}
- Description:
Convert from display coordinates to world coordinates using the attached camera.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
c |
geo.screenPosition | Array.<geo.screenPosition> | The input coordinate to convert. |
Returns:
World space coordinates.
- Type
- geo.worldPosition | Array.<geo.worldPosition>
draw() → {this}
- Description:
Redraw the map and all its layers.
- Source:
- Overrides:
Fires:
Returns:
The map object.
- Type
- this
exit()
- Description:
Exit this map. This removes all layers, destroys current interactor, and empties the associated DOM node.
- Source:
fileReader(readerOrNameopt, optsopt) → {geo.fileReader|this}
- Description:
Get, set, or create and set a file reader to a layer in the map to be used as a drop target.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
readerOrName |
string | object |
<optional> |
|
opts |
object |
<optional> |
options Parameters for creating a file reader when
the reader is specified by name. If this includes |
Returns:
- Type
- geo.fileReader | this
gcs(argopt) → {string|this}
- Description:
Get or set the map gcs. This is the coordinate system used in drawing the map.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
string |
<optional> |
If |
Returns:
A string used by geo.transform
.
- Type
- string | this
gcsToDisplay(c, gcsopt) → {geo.screenPosition|Array.<geo.screenPosition>}
- Description:
Convert from gcs coordinates to display coordinates. This is identical to calling
gcsToWorld
and thenworldToDisplay
.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
c |
geo.geoPosition | Array.<geo.geoPosition> | The input coordinate to convert. |
|
gcs |
string | geo.transform | null |
<optional> |
Input gcs. |
Returns:
Display space coordinates.
- Type
- geo.screenPosition | Array.<geo.screenPosition>
gcsToWorld(c, gcsopt) → {geo.worldPosition|Array.<geo.worldPosition>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
c |
geo.geoPosition | Array.<geo.geoPosition> | The input coordinate to convert. |
|
gcs |
string | geo.transform | null |
<optional> |
Input gcs. |
Returns:
World space coordinates.
- Type
- geo.worldPosition | Array.<geo.worldPosition>
geoIsOn(event, handleropt) → {boolean}
- Description:
Report if an event handler is bound to this object.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | Array.<string> | An event or list of events to check. |
|
handler |
function |
<optional> |
A function that might be bound. If
|
Returns:
true if any of the specified events are bound to the specified handler.
- Type
- boolean
geoOff(eventopt, argopt, nullable) → {this}
- Description:
Remove handlers from one event or an array of events. If no event is provided all handlers will be removed.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | Array.<string> |
<optional> |
An event or a list of events from
|
arg |
function | Array.<function()> |
<optional> <nullable> |
A function or array of functions to remove from the events or a falsy value to remove all handlers from the events. |
Returns:
- Type
- this
geoOn(event, handler) → {this}
- Description:
Bind an event handler to this object.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
event |
string | An event from |
handler |
function | A function that is called when |
Returns:
- Type
- this
geoOnce(event, handler) → {function}
- Description:
Bind an event handler to this object that will fire once and then deregister itself.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
event |
string | An event from |
handler |
function | A function that is called when |
Returns:
The actual bound handler. This is a wrapper around the handler that was passed to the function.
- Type
- function
geoTrigger(event, args, childrenOnlyopt) → {this}
- Description:
Trigger an event (or events) on this object and call all handlers.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
event |
string | The event to trigger. |
|
args |
object | Arbitrary argument to pass to the handler. |
|
childrenOnly |
boolean |
<optional> |
If truthy, only propagate down the tree. |
Returns:
- Type
- this
ingcs(argopt) → {string|this}
- Description:
Get or set the map interface gcs. This is the coordinate system used when getting or setting map bounds, center, and other values.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
string |
<optional> |
If |
Returns:
A string used by geo.transform
.
- Type
- string | this
interactor(argopt) → {geo.mapInteractor|this}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
geo.mapInteractor |
<optional> |
If specified, the map interactor to set. |
Returns:
The current map interactor or the map object.
- Type
- geo.mapInteractor | this
layers()
- Description:
Get the layers contained in the map. Alias of
geo.sceneObject#children
.
- Source:
listSceneObjects(objectsopt) → {Array.<geo.sceneObject>}
- Description:
Get a sorted list of
geo.sceneObject
including all children. The list always includes specified objects. Children immediately follow their parents. Siblings may be separated by children of preceding siblings.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
objects |
Array.<geo.sceneObject> |
<optional> |
A list of objects for which the a combined list of dependents is generated. If not specified, the sorted list of layers is used. |
Returns:
A list of object and dependents.
- Type
- Array.<geo.sceneObject>
maxBounds(boundsopt, gcsopt) → {geo.geoBounds|this}
- Description:
Get/set the maximum view area of the map. If the map wraps, this is the unwrapped area.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
bounds |
geo.geoBounds |
<optional> |
The map bounds. |
gcs |
string | geo.transform | null |
<optional> |
|
Returns:
The map maximum bounds or the map object.
- Type
- geo.geoBounds | this
modified() → {this}
- Description:
Update the timestamp to the next global timestamp value.
- Source:
- Inherited From:
Returns:
- Type
- this
node() → {object}
Returns:
- Type
- object
onIdle(handler) → {this}
- Description:
Bind a handler that will be called one time when all internal promises are resolved. If there are no outstanding promises, this is invoked synchronously.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
handler |
function | A function taking no arguments. |
Returns:
- Type
- this
origin() → {geo.geoPosition}
Returns:
- Type
- geo.geoPosition
pan(delta, ignoreDiscreteZoomopt, ignoreClampBoundsopt) → {this}
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
delta |
object | Amount to pan in display pixels. Properties
|
||||||||||
ignoreDiscreteZoom |
boolean |
<optional> |
If |
|||||||||
ignoreClampBounds |
boolean | 'limited' |
<optional> |
If |
Fires:
Returns:
- Type
- this
parent(argopt) → {this|geo.sceneObject}
- Description:
Get/set parent of the object.
- Source:
- Inherited From:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
geo.sceneObject |
<optional> |
The new parent or |
Returns:
- Type
- this | geo.sceneObject
removeChild(child) → {this}
- Description:
Remove a child (or array of children) from the object.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
child |
geo.object | Array.<geo.object> | A child object or array of child objects. |
Returns:
- Type
- this
removePromise(promise) → {this}
- Description:
Remove the promise here and also propagate up the scene tree.
- Source:
- Inherited From:
Parameters:
Name | Type | Description |
---|---|---|
promise |
Promise | A promise object. |
Returns:
- Type
- this
rotatedSize() → {geo.screenSize}
- Description:
Get the rotated size of the map. This is the width and height of the non-rotated area necessary to enclose the rotated area in pixels.
- Source:
Returns:
The size that fits the rotated map.
- Type
- geo.screenSize
rotation(rotationopt, originopt, ignoreRotationFuncopt) → {number|this}
- Description:
Get/set the map rotation. The rotation is performed around the current view center. Rotation mostly ignores
clampBoundsX
, as the behavior feels peculiar otherwise.
- Source:
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
rotation |
number |
<optional> |
Absolute angle in radians (positive is clockwise). |
|||||||||
origin |
object |
<optional> |
If specified, rotate about this origin. Properties
|
|||||||||
ignoreRotationFunc |
boolean |
<optional> |
If |
Fires:
Returns:
- Type
- number | this
scheduleAnimationFrame(callback, actionopt) → {number}
- Description:
Instead of each function using
window.requestAnimationFrame
, schedule all such frames through this function. This allows the callbacks to be reordered or removed as needed and reduces overhead in Chrome a small amount. Also, if the animation queue is shared between map instances, the callbacks will be called in a single time slice, providing better synchronization.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
callback |
function | Function to call during the animation frame.
It is called with an animation epoch, exactly as
|
||
action |
boolean | 'remove' |
<optional> |
false
|
Falsy to only add the callback if
it is not already scheduled. |
Returns:
An integer as returned by
window.requestAnimationFrame
.
- Type
- number
screenshot(layersopt, typeopt, encoderOptionsopt, optsopt) → {jQueryDeferred}
- Description:
Get a screen-shot of all or some of the canvas layers of map. Note that webGL layers are rerendered, even if
window.overrideContextAttributes.preserveDrawingBuffer = true;
is set before creating the map object. Chrome, at least, may not keep the drawing buffers if the tab loses focus (and returning focus won't necessarily rerender).
- Source:
Parameters:
Name | Type | Attributes | Default | Description | |||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
layers |
geo.layer | Array.<geo.layer> | false | object |
<optional> |
Either a layer, a
list of layers, falsy to get all layers, or an object that contains
optional values of |
||||||||||||||||||||||||||
type |
string |
<optional> |
'image/png'
|
See canvas.toDataURL. Use |
|||||||||||||||||||||||||
encoderOptions |
number |
<optional> |
See canvas.toDataURL. |
||||||||||||||||||||||||||
opts |
object |
<optional> |
Additional screenshot options. Properties
|
Fires:
Returns:
A jQuery Deferred object. The done function
receives either a data URL or an HTMLCanvasElement
with the result.
- Type
- jQueryDeferred
size(argopt) → {geo.screenSize|this}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
arg |
geo.screenSize |
<optional> |
Size in pixels. |
Fires:
Returns:
The size in pixels or the map object.
- Type
- geo.screenSize | this
sortedLayers() → {Array.<geo.layer>}
- Description:
Get the layers contained in the map sorted by zIndex. If two layers have the same zIndex, they are returned in creation order.
- Source:
Returns:
- Type
- Array.<geo.layer>
timestamp() → {number}
- Description:
Get time.
- Source:
- Inherited From:
Returns:
The timestamp. This is 0 if the timestamp has never been modified.
- Type
- number
transition(optsopt, gcsopt, animTimeopt) → {geo.map}
- Description:
Get the current transition or start an animated zoom/pan/rotate. If a second transition is requested while a transition is already in progress, a new transition is created that is functionally from wherever the map has moved to (possibly partway through the first transition) going to the end point of the new transition.
- Source:
Parameters:
Name | Type | Attributes | Description | |||||||||||||||||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
opts |
object |
<optional> |
Options for a transition, or Properties
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
gcs |
string | geo.transform | null |
<optional> |
Input gcs. |
|||||||||||||||||||||||||||||||||||||||||||||||||||||||
animTime |
number |
<optional> |
The animation frame time (from a
|
Fires:
Returns:
- Type
- geo.map
transitionCancel(sourceopt) → {boolean}
- Description:
Cancel any existing transition. The transition will send a cancel event at the next animation frame, but no further activity occurs.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
source |
string |
<optional> |
Optional cause of the cancel. This can be any
value, but something like |
Fires:
Returns:
true
if a transition was in progress.
- Type
- boolean
unitsPerPixel(zoomopt, unitopt, nullable) → {number|this}
- Description:
Get/set the number of world space units per display pixel at the given zoom level.
- Source:
Parameters:
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
zoom |
number |
<optional> |
0
|
The target zoom level. |
unit |
number |
<optional> <nullable> |
If present, set the |
Returns:
- Type
- number | this
updateAttribution() → {this}
- Description:
Update the attribution notice displayed on the bottom right corner of the map. The content of this notice is managed by individual layers. This method queries all of the visible layers and joins the individual attribution notices into a single element. By default, this method is called on each of the following events:
In addition, layers should call this method when their own attribution notices have changed. Users, in general, should not need to call this.
- Source:
Returns:
Chainable.
- Type
- this
worldToDisplay(c) → {geo.screenPosition|Array.<geo.screenPosition>}
- Description:
Convert from world coordinates to display coordinates using the attached camera.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
c |
geo.worldPosition | Array.<geo.worldPosition> | The input coordinate to convert. |
Returns:
Display space coordinates.
- Type
- geo.screenPosition | Array.<geo.screenPosition>
worldToGcs(c, gcsopt) → {geo.geoPosition|Array.<geo.geoPosition>}
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
c |
geo.worldPosition | Array.<geo.worldPosition> | The input coordinate to convert. |
|
gcs |
string | geo.transform | null |
<optional> |
output gcs. |
Returns:
GCS space coordinates.
- Type
- geo.geoPosition | Array.<geo.geoPosition>
zoom(valopt, originopt, ignoreDiscreteZoomopt, ignoreClampBoundsopt) → {number|this}
Parameters:
Name | Type | Attributes | Description | |||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|
val |
number |
<optional> |
If |
|||||||||
origin |
object |
<optional> |
If present, specifies the center of the zoom; otherwise the map's display center is used. Properties
|
|||||||||
ignoreDiscreteZoom |
boolean |
<optional> |
If |
|||||||||
ignoreClampBounds |
boolean |
<optional> |
If |
Fires:
Returns:
- Type
- number | this
zoomAndCenterFromBounds(bounds, rotation, gcsopt) → {geo.zoomAndCenter}
- Description:
Get the center zoom level necessary to display the given bounds.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
bounds |
geo.geoBounds | The requested map bounds. |
|
rotation |
number | Rotation in clockwise radians. |
|
gcs |
string | geo.transform | null |
<optional> |
|
Returns:
- Type
- geo.zoomAndCenter
zoomRange(argopt, noRefreshopt) → {object|this}
Parameters:
Name | Type | Attributes | Description | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
arg |
object |
<optional> |
The zoom range. Properties
|
||||||||||||
noRefresh |
boolean |
<optional> |
If |
Returns:
The current zoom range or the map object. The
min
value is the minimum value that the map can go to based on the
current dimensions and settings, the origMin
value is the value that
was specified via this function or when the map was created.
- Type
- object | this
(static) create(spec) → {geo.map|null}
- Description:
Create a map from an object. Any errors in the creation of the map will result in returning
null
.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
spec |
geo.map.createSpec | The map creation specification. |
Returns:
- Type
- geo.map | null
(inner) handleBrowserHidden()
- Description:
Trigger an event when the browser is hidden or unhidden.
See
geo.map.trackBrowserHidden
.
- Source:
(inner) layerZIndexSort(a, b) → {number}
- Description:
Comapare two layers by zIndex. If the zIndex is the same, the order in the parent element is used. If the two layers don't have the same parent (for instance, one layer isn't attached to the map), layers in the map are sorted below detached layers.
- Source:
Parameters:
Name | Type | Description |
---|---|---|
a |
geo.layer | First layer to compare. |
b |
geo.layer | Second layer to compare. |
Returns:
Positive if a
is above b
.
- Type
- number
(inner) trackBrowserHidden(enableopt)
- Description:
Track when the browser tab is hidden or unhidden.
Based on https://developer.mozilla.org/en-US/docs/Web/API/Page_Visibility_API as accessed on 2019-10-24.
- Source:
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
enable |
boolean |
<optional> |
If |
Type Definitions
createSpec
Properties:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
data |
Array.<object> |
<optional> |
[]
|
The default data array to apply to each feature if none exists. |
||||||||||||||||||||||||||||||
layers |
Array.<geo.layer.spec> |
<optional> |
[]
|
Layers to create. |
||||||||||||||||||||||||||||||
node |
string | DOM selector for the map container. |
||||||||||||||||||||||||||||||||
gcs |
string | geo.transform |
<optional> |
'EPSG:3857'
|
The main coordinate system of the map (this is often web Mercator). |
||||||||||||||||||||||||||||||
ingcs |
string | geo.transform |
<optional> |
'EPSG:4326'
|
The default coordinate system of interface calls (this is often latitude and longitude). |
||||||||||||||||||||||||||||||
unitsPerPixel |
number |
<optional> |
156543
|
GCS to pixel unit scaling at zoom
0 (i.e., meters per pixel or degrees per pixel). The actual default is
|
||||||||||||||||||||||||||||||
maxBounds |
object |
<optional> |
The maximum visible map bounds. Properties
|
|||||||||||||||||||||||||||||||
zoom |
number |
<optional> |
4
|
Initial zoom. |
||||||||||||||||||||||||||||||
center |
object |
<optional> |
Initial map center. Properties
|
|||||||||||||||||||||||||||||||
rotation |
number |
<optional> |
0
|
Initial clockwise rotation in radians. |
||||||||||||||||||||||||||||||
width |
number |
<optional> |
The map width (default node width). |
|||||||||||||||||||||||||||||||
height |
number |
<optional> |
The map height (default node height). |
|||||||||||||||||||||||||||||||
min |
number |
<optional> |
0
|
Minimum zoom level (though fitting to the viewport may make it so this is smaller than the smallest possible value). |
||||||||||||||||||||||||||||||
max |
number |
<optional> |
16
|
Maximum zoom level. |
||||||||||||||||||||||||||||||
discreteZoom |
boolean |
<optional> |
false
|
If |
||||||||||||||||||||||||||||||
allowRotation |
boolean | function |
<optional> |
true
|
|
||||||||||||||||||||||||||||||
camera |
geo.camera |
<optional> |
The camera to control the view. |
|||||||||||||||||||||||||||||||
interactor |
geo.mapInteractor |
<optional> |
The UI event handler. If
|
|||||||||||||||||||||||||||||||
animationQueue |
array |
<optional> |
An array used to synchronize animations. If specified, this should be an empty array or the same array as passed to other map instances. |
|||||||||||||||||||||||||||||||
autoResize |
boolean |
<optional> |
true
|
Adjust map size on window resize. |
||||||||||||||||||||||||||||||
clampBoundsX |
boolean |
<optional> |
false
|
Prevent panning outside of the maximum bounds in the horizontal direction. |
||||||||||||||||||||||||||||||
clampBoundsY |
boolean |
<optional> |
true
|
Prevent panning outside of the maximum bounds in the vertical direction. |
||||||||||||||||||||||||||||||
clampZoom |
boolean |
<optional> |
true
|
Prevent zooming out so that the map area is smaller than the window. |
||||||||||||||||||||||||||||||
autoshareRenderer |
boolean | string |
<optional> |
If specified, pass this value
to layers when they are created. See
|
Specification used with map.create
.
Type:
spec
Properties:
Name | Type | Attributes | Default | Description | ||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
node |
string | DOM selector for the map container. |
||||||||||||||||||||||||||||||||
gcs |
string | geo.transform |
<optional> |
'EPSG:3857'
|
The main coordinate system of the map (this is often web Mercator). |
||||||||||||||||||||||||||||||
ingcs |
string | geo.transform |
<optional> |
'EPSG:4326'
|
The default coordinate system of interface calls (this is often latitude and longitude). |
||||||||||||||||||||||||||||||
unitsPerPixel |
number |
<optional> |
156543
|
GCS to pixel unit scaling at zoom
0 (i.e., meters per pixel or degrees per pixel). The actual default is
|
||||||||||||||||||||||||||||||
maxBounds |
object |
<optional> |
The maximum visible map bounds. Properties
|
|||||||||||||||||||||||||||||||
zoom |
number |
<optional> |
4
|
Initial zoom. |
||||||||||||||||||||||||||||||
center |
object |
<optional> |
Initial map center. Properties
|
|||||||||||||||||||||||||||||||
rotation |
number |
<optional> |
0
|
Initial clockwise rotation in radians. |
||||||||||||||||||||||||||||||
width |
number |
<optional> |
The map width (default node width). |
|||||||||||||||||||||||||||||||
height |
number |
<optional> |
The map height (default node height). |
|||||||||||||||||||||||||||||||
min |
number |
<optional> |
0
|
Minimum zoom level (though fitting to the viewport may make it so this is smaller than the smallest possible value). |
||||||||||||||||||||||||||||||
max |
number |
<optional> |
16
|
Maximum zoom level. |
||||||||||||||||||||||||||||||
discreteZoom |
boolean |
<optional> |
false
|
If |
||||||||||||||||||||||||||||||
allowRotation |
boolean | function |
<optional> |
true
|
|
||||||||||||||||||||||||||||||
camera |
geo.camera |
<optional> |
The camera to control the view. |
|||||||||||||||||||||||||||||||
interactor |
geo.mapInteractor |
<optional> |
The UI event handler. If
|
|||||||||||||||||||||||||||||||
animationQueue |
array |
<optional> |
An array used to synchronize animations. If specified, this should be an empty array or the same array as passed to other map instances. |
|||||||||||||||||||||||||||||||
autoResize |
boolean |
<optional> |
true
|
Adjust map size on window resize. |
||||||||||||||||||||||||||||||
clampBoundsX |
boolean |
<optional> |
false
|
Prevent panning outside of the maximum bounds in the horizontal direction. |
||||||||||||||||||||||||||||||
clampBoundsY |
boolean |
<optional> |
true
|
Prevent panning outside of the maximum bounds in the vertical direction. |
||||||||||||||||||||||||||||||
clampZoom |
boolean |
<optional> |
true
|
Prevent zooming out so that the map area is smaller than the window. |
||||||||||||||||||||||||||||||
autoshareRenderer |
boolean | string |
<optional> |
If specified, pass this value
to layers when they are created. See
|
Map specification.
Type:
- object