ui/locations/entries/pin
The pin entry module exports the pin method as mapp.ui.locations.entries.pin()
Dictionary entries:
- pin
Requires
- module:/dictionary
- module:/ui/elements/chkbox
- module:/ol/extent/buffer
Methods
(inner) getExtent(entry) → {Array}
Calculates the extent of the pin. Applies a buffer if one has been supplied to the pin.
Name | Type | Description |
---|---|---|
entry | infoj-entry | type:pin entry. |
Name | Type | Attributes | Description |
---|---|---|---|
entry.buffer | boolean | | <optional> | a value to buffer the pin with or just true for a default of 200. |
Array representing Openlayers extent.
- Type:
- Array
(inner) hide()
Sets the display property to false and calls the remove method.
(inner) pin(entry) → {HTMLElement}
Places a pin on the selected location on the map. A checkbox is supplied to turn the pin on and off.
The pin will be styled by the entry.style property if provided. Otherwise the location.pinStyle assigned by the locations listview method will be used. A location may not have a pinStyle if no listview has been configured for the mapview.
Name | Type | Description |
---|---|---|
entry | infoj-entry | type:pin entry. |
Name | Type | Attributes | Default | Description |
---|---|---|---|---|
entry.location | location | The entry location. | ||
entry.value | array | An array containing entrys' co-ordinates. | ||
entry.label | string | <optional> | Label for checkbox element. | |
entry.display | boolean | <optional> | true | The pin display flag. |
entry.srid | string | <optional> | The srid of the pin. | |
entry.zIndex | integer | <optional> | The html layer on which the pin should display. | |
entry.style | object | <optional> | Style properties of the pin which may include a scale. |
Location pin and display checkbox.
- Type:
- HTMLElement
(inner) show()
Calls removeLayer method to remove layer from location before creating a new Openlayers layer which is pushed into the location.Layers array property.