new LiteMap(options)
Create and return a new LiteMap instance
Parameters:
Name | Type | Description |
---|---|---|
options |
module:ol-ishare/litemap~MapOptions | LiteMap options |
Members
map
Properties:
Name | Type | Description |
---|---|---|
map |
ol/Map~Map | OpenLayers Map instance |
profile
Properties:
Name | Type | Description |
---|---|---|
profile |
module:ol-ishare/profile~Profile | Current profile instance |
Methods
loadProfile(profile, options)
Load a given profile Object, once loaded dispatch a profileload
event.
Parameters:
Name | Type | Description | ||||||
---|---|---|---|---|---|---|---|---|
profile |
module:ol-ishare/profile~Profile | iShare profile as provided by |
||||||
options |
Object | Options that affect how the profile is loaded Properties
|
getAddressSearch(optionsopt) → {module:ol-ishare/search~AddressSearch}
Get an address search instance compatible with Gazetteer control pre-configured with setting relevant to the current profile.
Parameters:
Name | Type | Attributes | Description | ||||||||
---|---|---|---|---|---|---|---|---|---|---|---|
options |
Object |
<optional> |
Options Properties
|
Returns:
Address search instance
resetView() → {ol/extent~Extent}
(Re)sets the view to that set in the current profile
Returns:
Actual extent of updated map view (after accounting for fixed zoom levels)
- Type
- ol/extent~Extent
zoomToFeatures(features, options) → {ol/extent~Extent}
Change the view of the map to centre on the supplied features at a resolution that shows them all in context
Parameters:
Name | Type | Description |
---|---|---|
features |
Array.<ol/Feature~Feature> | Features around which the map should be redrawn |
options |
ol/View~FitOptions | Options passed to |
Returns:
Actual extent of updated map view (after accounting for fixed zoom levels)
- Type
- ol/extent~Extent
zoomToProfile() → {ol/extent~Extent}
Change the view of the map to show the full extent of the profile
Returns:
Actual extent of updated map view (after accounting for fixed zoom levels)
- Type
- ol/extent~Extent
(static) defaultInteractions(opt_optionsopt) → {ol/Collection.<ol/interaction/Interaction>}
Get the interactions included in maps by default. Specific interactions can be
excluded by setting the appropriate option to false in the constructor
options, but the order of the interactions is fixed. If you want to specify
a different order for interactions, you will need to create your own
ol/interaction/Interaction
instances and insert
them into a ol/Collection
in the order you want
before creating your ol/Map~Map
instance. The default set of
interactions are the OpenLayers default (see http://openlayers.org/en/latest/apidoc/module-ol_interaction.html)
minus: ol/interaction/DragRotate~DragRotate
and ol/interaction/PinchRotate~PinchRotate
plus: module:ol-ishare/interaction/infopopup~InfoPopup
.
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
opt_options |
ol/interaction/Interaction~DefaultsOptions |
<optional> |
Default options. |
Returns:
A collection of interactions to be used with the ol/Map~Map
constructor's interactions
option.
(static) defaultControls(opt_optionsopt) → {ol/Collection.<ol/control/Control>}
Get the controls and their settings included in maps by default. Specific controls can be
excluded by setting the appropriate option to false in the constructor
options, but the order of the controls is fixed. If you want to specify
a different order for controls, you will need to create your own
ol/control/Control
instances and insert
them into a ol/Collection
in the order you want
before creating your ol/Map~Map
instance. The default set of
controls are the OpenLayers default (see https://openlayers.org/en/latest/apidoc/module-ol_control.html).
Changes to default configuration:
attributionOptions: { collapsible: false }
Parameters:
Name | Type | Attributes | Description |
---|---|---|---|
opt_options |
ol/control/Control~DefaultsOptions |
<optional> |
Default options. |
Returns:
A collection of controls to be used with the ol/Map~Map
constructor's control
option.
- Type
- ol/Collection.<ol/control/Control>