2017-07-16 23:04:05 +00:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
2017-10-29 07:44:06 +00:00
|
|
|
import QtQuick 2.6
|
2017-07-14 14:53:08 +00:00
|
|
|
import QtLocation 5.3
|
|
|
|
import QtPositioning 5.3
|
2017-07-16 00:01:54 +00:00
|
|
|
import org.subsurfacedivelog.mobile 1.0
|
2017-07-14 14:53:08 +00:00
|
|
|
|
2017-07-14 21:55:29 +00:00
|
|
|
Item {
|
2017-08-12 00:58:26 +00:00
|
|
|
id: rootItem
|
2017-07-24 19:50:18 +00:00
|
|
|
property int nSelectedDives: 0
|
|
|
|
|
2017-07-16 00:01:54 +00:00
|
|
|
MapWidgetHelper {
|
|
|
|
id: mapHelper
|
2017-07-16 20:59:09 +00:00
|
|
|
map: map
|
2017-07-27 21:09:25 +00:00
|
|
|
editMode: false
|
2017-07-28 13:40:28 +00:00
|
|
|
onSelectedDivesChanged: nSelectedDives = list.length
|
2017-07-27 21:09:25 +00:00
|
|
|
onEditModeChanged: editMessage.isVisible = editMode === true ? 1 : 0
|
2017-07-27 21:36:06 +00:00
|
|
|
onCoordinatesChanged: {}
|
2017-08-12 00:58:26 +00:00
|
|
|
Component.onCompleted: {
|
|
|
|
map.plugin = Qt.createQmlObject(pluginObject, rootItem)
|
|
|
|
map.mapType = { "STREET": map.supportedMapTypes[0], "SATELLITE": map.supportedMapTypes[1] }
|
|
|
|
map.activeMapType = map.mapType.SATELLITE
|
|
|
|
}
|
2017-07-16 00:01:54 +00:00
|
|
|
}
|
|
|
|
|
2017-07-14 14:53:08 +00:00
|
|
|
Map {
|
2017-07-15 21:56:54 +00:00
|
|
|
id: map
|
2017-07-14 14:53:08 +00:00
|
|
|
anchors.fill: parent
|
2017-10-27 10:39:03 +00:00
|
|
|
zoomLevel: defaultZoomIn
|
2017-07-15 21:56:54 +00:00
|
|
|
|
2017-08-12 00:58:26 +00:00
|
|
|
property var mapType
|
2017-07-19 21:09:53 +00:00
|
|
|
readonly property var defaultCenter: QtPositioning.coordinate(0, 0)
|
2017-07-27 21:25:48 +00:00
|
|
|
readonly property real defaultZoomIn: 12.0
|
2017-07-25 15:38:15 +00:00
|
|
|
readonly property real defaultZoomOut: 1.0
|
2017-07-31 19:50:04 +00:00
|
|
|
readonly property real textVisibleZoom: 11.0
|
2017-07-25 15:38:15 +00:00
|
|
|
readonly property real zoomStep: 2.0
|
2017-07-19 21:09:53 +00:00
|
|
|
property var newCenter: defaultCenter
|
2017-07-25 15:38:15 +00:00
|
|
|
property real newZoom: 1.0
|
2017-07-27 21:25:48 +00:00
|
|
|
property real newZoomOut: 1.0
|
2017-07-25 15:38:15 +00:00
|
|
|
property var clickCoord: QtPositioning.coordinate(0, 0)
|
2017-10-28 10:56:09 +00:00
|
|
|
property bool isReady: false
|
2017-07-16 22:16:27 +00:00
|
|
|
|
2017-10-28 10:56:09 +00:00
|
|
|
Component.onCompleted: isReady = true
|
|
|
|
onZoomLevelChanged: {
|
|
|
|
if (isReady)
|
|
|
|
mapHelper.calculateSmallCircleRadius(map.center)
|
|
|
|
}
|
2017-07-24 13:17:37 +00:00
|
|
|
|
2017-07-17 19:24:30 +00:00
|
|
|
MapItemView {
|
|
|
|
id: mapItemView
|
|
|
|
model: mapHelper.model
|
|
|
|
delegate: MapQuickItem {
|
2017-07-27 21:25:48 +00:00
|
|
|
id: mapItem
|
2017-07-17 19:24:30 +00:00
|
|
|
anchorPoint.x: 0
|
|
|
|
anchorPoint.y: mapItemImage.height
|
2017-07-17 19:36:55 +00:00
|
|
|
coordinate: model.coordinate
|
2017-07-19 20:51:39 +00:00
|
|
|
z: mapHelper.model.selectedUuid === model.uuid ? mapHelper.model.count - 1 : 0
|
2017-10-15 18:19:29 +00:00
|
|
|
sourceItem: Image {
|
|
|
|
id: mapItemImage
|
2017-10-15 21:12:20 +00:00
|
|
|
source: "qrc:///mapwidget-marker" + (mapHelper.model.selectedUuid === model.uuid ? "-selected" : (mapHelper.editMode ? "-gray" : ""))
|
2017-10-15 18:19:29 +00:00
|
|
|
SequentialAnimation {
|
|
|
|
id: mapItemImageAnimation
|
|
|
|
PropertyAnimation { target: mapItemImage; property: "scale"; from: 1.0; to: 0.7; duration: 120 }
|
|
|
|
PropertyAnimation { target: mapItemImage; property: "scale"; from: 0.7; to: 1.0; duration: 80 }
|
|
|
|
}
|
|
|
|
MouseArea {
|
|
|
|
drag.target: (mapHelper.editMode && mapHelper.model.selectedUuid === model.uuid) ? mapItem : undefined
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: {
|
|
|
|
if (!mapHelper.editMode)
|
|
|
|
mapHelper.model.setSelectedUuid(model.uuid, true)
|
2017-07-19 21:06:08 +00:00
|
|
|
}
|
2017-10-15 18:19:29 +00:00
|
|
|
onDoubleClicked: map.doubleClickHandler(mapItem.coordinate)
|
|
|
|
onReleased: {
|
|
|
|
if (mapHelper.editMode && mapHelper.model.selectedUuid === model.uuid) {
|
2017-11-09 16:43:21 +00:00
|
|
|
mapHelper.updateCurrentDiveSiteCoordinatesFromMap(mapHelper.model.selectedUuid, mapItem.coordinate)
|
2017-07-27 21:25:48 +00:00
|
|
|
}
|
2017-07-25 20:43:18 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
Item {
|
|
|
|
// Text with a duplicate for shadow. DropShadow as layer effect is kind of slow here.
|
|
|
|
y: mapItemImage.y + mapItemImage.height
|
2017-07-27 21:25:48 +00:00
|
|
|
visible: map.zoomLevel >= map.textVisibleZoom
|
2017-07-25 20:43:18 +00:00
|
|
|
Text {
|
|
|
|
id: mapItemTextShadow
|
|
|
|
x: mapItemText.x + 2; y: mapItemText.y + 2
|
|
|
|
text: mapItemText.text
|
|
|
|
font.pointSize: mapItemText.font.pointSize
|
|
|
|
color: "black"
|
|
|
|
}
|
|
|
|
Text {
|
|
|
|
id: mapItemText
|
|
|
|
text: model.name
|
|
|
|
font.pointSize: 11.0
|
2017-07-27 21:30:18 +00:00
|
|
|
color: mapHelper.model.selectedUuid === model.uuid ? "white" : "lightgrey"
|
2017-07-19 21:06:08 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-18 23:36:59 +00:00
|
|
|
}
|
2017-07-17 19:24:30 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-27 21:25:48 +00:00
|
|
|
SequentialAnimation {
|
2017-07-19 22:33:15 +00:00
|
|
|
id: mapAnimationZoomIn
|
2017-07-16 22:16:27 +00:00
|
|
|
NumberAnimation {
|
2017-07-27 21:25:48 +00:00
|
|
|
target: map; property: "zoomLevel"; to: map.newZoomOut; duration: Math.abs(map.newZoomOut - map.zoomLevel) * 200
|
|
|
|
}
|
|
|
|
ParallelAnimation {
|
2017-07-28 13:40:28 +00:00
|
|
|
CoordinateAnimation { target: map; property: "center"; to: map.newCenter; duration: 1000 }
|
2017-07-27 21:25:48 +00:00
|
|
|
NumberAnimation {
|
|
|
|
target: map; property: "zoomLevel"; to: map.newZoom ; duration: 2000; easing.type: Easing.InCubic
|
|
|
|
}
|
2017-07-16 22:16:27 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-19 22:33:15 +00:00
|
|
|
ParallelAnimation {
|
|
|
|
id: mapAnimationZoomOut
|
2017-07-28 13:40:28 +00:00
|
|
|
NumberAnimation { target: map; property: "zoomLevel"; from: map.zoomLevel; to: map.newZoom; duration: 3000 }
|
2017-07-19 22:33:15 +00:00
|
|
|
SequentialAnimation {
|
|
|
|
PauseAnimation { duration: 2000 }
|
2017-07-28 13:40:28 +00:00
|
|
|
CoordinateAnimation { target: map; property: "center"; to: map.newCenter; duration: 2000 }
|
2017-07-19 22:33:15 +00:00
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-25 15:34:24 +00:00
|
|
|
ParallelAnimation {
|
|
|
|
id: mapAnimationClick
|
2017-07-28 13:40:28 +00:00
|
|
|
CoordinateAnimation { target: map; property: "center"; to: map.newCenter; duration: 500 }
|
|
|
|
NumberAnimation { target: map; property: "zoomLevel"; to: map.newZoom; duration: 500 }
|
2017-07-25 15:34:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
2017-11-25 22:10:08 +00:00
|
|
|
onPressed: { map.stopZoomAnimations(); mouse.accepted = false }
|
|
|
|
onWheel: { map.stopZoomAnimations(); wheel.accepted = false }
|
2017-07-25 15:34:24 +00:00
|
|
|
onDoubleClicked: map.doubleClickHandler(map.toCoordinate(Qt.point(mouseX, mouseY)))
|
|
|
|
}
|
|
|
|
|
|
|
|
function doubleClickHandler(coord) {
|
|
|
|
newCenter = coord
|
|
|
|
newZoom = zoomLevel + zoomStep
|
2017-07-25 15:55:36 +00:00
|
|
|
if (newZoom > maximumZoomLevel)
|
|
|
|
newZoom = maximumZoomLevel
|
2017-07-25 15:34:24 +00:00
|
|
|
mapAnimationClick.restart()
|
|
|
|
}
|
|
|
|
|
2017-07-19 22:33:15 +00:00
|
|
|
function animateMapZoomOut() {
|
2017-07-25 15:38:15 +00:00
|
|
|
newCenter = defaultCenter
|
|
|
|
newZoom = defaultZoomOut
|
2017-07-19 22:33:15 +00:00
|
|
|
mapAnimationZoomIn.stop()
|
|
|
|
mapAnimationZoomOut.restart()
|
2017-07-19 21:22:52 +00:00
|
|
|
}
|
|
|
|
|
2017-08-06 23:13:25 +00:00
|
|
|
function pointIsVisible(pt) {
|
|
|
|
return !isNaN(pt.x)
|
|
|
|
}
|
|
|
|
|
|
|
|
function stopZoomAnimations() {
|
|
|
|
mapAnimationZoomIn.stop()
|
|
|
|
mapAnimationZoomOut.stop()
|
|
|
|
}
|
|
|
|
|
2017-07-27 20:46:54 +00:00
|
|
|
function centerOnCoordinate(coord) {
|
2017-08-06 23:13:25 +00:00
|
|
|
stopZoomAnimations()
|
2017-07-27 21:25:48 +00:00
|
|
|
if (coord.latitude === 0.0 && coord.longitude === 0.0) {
|
2017-10-23 14:04:33 +00:00
|
|
|
// Do nothing
|
2017-07-27 21:25:48 +00:00
|
|
|
} else {
|
2017-08-07 23:10:23 +00:00
|
|
|
var newZoomOutFound = false
|
2017-07-27 21:25:48 +00:00
|
|
|
var zoomStored = zoomLevel
|
|
|
|
newZoomOut = zoomLevel
|
2017-10-23 14:04:33 +00:00
|
|
|
newCenter = coord
|
2017-07-27 21:25:48 +00:00
|
|
|
while (zoomLevel > minimumZoomLevel) {
|
2017-08-06 23:13:25 +00:00
|
|
|
var pt = fromCoordinate(coord)
|
|
|
|
if (pointIsVisible(pt)) {
|
2017-07-27 21:25:48 +00:00
|
|
|
newZoomOut = zoomLevel
|
2017-08-07 23:10:23 +00:00
|
|
|
newZoomOutFound = true
|
2017-07-27 21:25:48 +00:00
|
|
|
break
|
|
|
|
}
|
|
|
|
zoomLevel--
|
|
|
|
}
|
2017-08-07 23:10:23 +00:00
|
|
|
if (!newZoomOutFound)
|
|
|
|
newZoomOut = defaultZoomOut
|
2017-07-27 21:25:48 +00:00
|
|
|
zoomLevel = zoomStored
|
2017-10-23 14:04:33 +00:00
|
|
|
newZoom = zoomStored
|
|
|
|
mapAnimationZoomIn.restart()
|
|
|
|
mapAnimationZoomOut.stop()
|
2017-07-27 21:25:48 +00:00
|
|
|
}
|
2017-07-16 21:25:19 +00:00
|
|
|
}
|
2017-07-19 21:29:42 +00:00
|
|
|
|
2017-08-06 23:18:09 +00:00
|
|
|
function centerOnRectangle(topLeft, bottomRight, centerRect) {
|
|
|
|
stopZoomAnimations()
|
|
|
|
if (newCenter.latitude === 0.0 && newCenter.longitude === 0.0) {
|
2017-10-23 14:04:33 +00:00
|
|
|
// Do nothing
|
2017-08-06 23:18:09 +00:00
|
|
|
} else {
|
|
|
|
var centerStored = QtPositioning.coordinate(center.latitude, center.longitude)
|
|
|
|
var zoomStored = zoomLevel
|
2017-08-07 23:10:23 +00:00
|
|
|
var newZoomOutFound = false
|
2017-10-23 14:04:33 +00:00
|
|
|
newCenter = centerRect
|
2017-08-06 23:18:09 +00:00
|
|
|
// calculate zoom out
|
|
|
|
newZoomOut = zoomLevel
|
|
|
|
while (zoomLevel > minimumZoomLevel) {
|
2017-08-07 23:10:23 +00:00
|
|
|
var ptCenter = fromCoordinate(centerStored)
|
|
|
|
var ptCenterRect = fromCoordinate(centerRect)
|
|
|
|
if (pointIsVisible(ptCenter) && pointIsVisible(ptCenterRect)) {
|
2017-08-06 23:18:09 +00:00
|
|
|
newZoomOut = zoomLevel
|
2017-08-07 23:10:23 +00:00
|
|
|
newZoomOutFound = true
|
2017-08-06 23:18:09 +00:00
|
|
|
break
|
|
|
|
}
|
|
|
|
zoomLevel--
|
|
|
|
}
|
2017-08-07 23:10:23 +00:00
|
|
|
if (!newZoomOutFound)
|
|
|
|
newZoomOut = defaultZoomOut
|
2017-08-06 23:18:09 +00:00
|
|
|
// calculate zoom in
|
|
|
|
center = newCenter
|
|
|
|
zoomLevel = maximumZoomLevel
|
2017-08-07 23:10:23 +00:00
|
|
|
var diagonalRect = topLeft.distanceTo(bottomRight)
|
2017-08-06 23:18:09 +00:00
|
|
|
while (zoomLevel > minimumZoomLevel) {
|
2017-08-07 23:10:23 +00:00
|
|
|
var c0 = toCoordinate(Qt.point(0.0, 0.0))
|
|
|
|
var c1 = toCoordinate(Qt.point(width, height))
|
|
|
|
if (c0.distanceTo(c1) > diagonalRect) {
|
|
|
|
newZoom = zoomLevel - 2.0
|
2017-08-06 23:18:09 +00:00
|
|
|
break
|
|
|
|
}
|
|
|
|
zoomLevel--
|
|
|
|
}
|
|
|
|
if (newZoom > defaultZoomIn)
|
|
|
|
newZoom = defaultZoomIn
|
|
|
|
zoomLevel = zoomStored
|
|
|
|
center = centerStored
|
2017-10-23 14:04:33 +00:00
|
|
|
mapAnimationZoomIn.restart()
|
|
|
|
mapAnimationZoomOut.stop()
|
2017-08-06 23:18:09 +00:00
|
|
|
}
|
2017-08-06 23:04:23 +00:00
|
|
|
}
|
|
|
|
|
2017-07-19 21:29:42 +00:00
|
|
|
function deselectMapLocation() {
|
2017-10-23 14:04:33 +00:00
|
|
|
stopZoomAnimations()
|
2017-07-19 21:29:42 +00:00
|
|
|
}
|
2017-07-20 02:24:18 +00:00
|
|
|
}
|
2017-07-20 00:07:47 +00:00
|
|
|
|
2017-07-27 21:09:25 +00:00
|
|
|
Rectangle {
|
|
|
|
id: editMessage
|
|
|
|
radius: padding
|
|
|
|
color: "#b08000"
|
|
|
|
border.color: "white"
|
|
|
|
x: (map.width - width) * 0.5; y: padding
|
|
|
|
width: editMessageText.width + padding * 2.0
|
|
|
|
height: editMessageText.height + padding * 2.0
|
|
|
|
visible: false
|
|
|
|
opacity: 0.0
|
|
|
|
property int isVisible: -1
|
|
|
|
property real padding: 10.0
|
|
|
|
onOpacityChanged: visible = opacity != 0.0
|
|
|
|
states: [
|
|
|
|
State { when: editMessage.isVisible === 1; PropertyChanges { target: editMessage; opacity: 1.0 }},
|
|
|
|
State { when: editMessage.isVisible === 0; PropertyChanges { target: editMessage; opacity: 0.0 }}
|
|
|
|
]
|
2017-07-28 13:40:28 +00:00
|
|
|
transitions: Transition { NumberAnimation { properties: "opacity"; easing.type: Easing.InOutQuad }}
|
2017-07-27 21:09:25 +00:00
|
|
|
Text {
|
|
|
|
id: editMessageText
|
|
|
|
y: editMessage.padding; x: editMessage.padding
|
|
|
|
verticalAlignment: Text.AlignVCenter
|
|
|
|
color: "white"
|
|
|
|
font.pointSize: 11.0
|
|
|
|
text: qsTr("Drag the selected dive location")
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-20 02:24:18 +00:00
|
|
|
Image {
|
|
|
|
id: toggleImage
|
|
|
|
x: 10; y: x
|
2017-07-31 19:43:19 +00:00
|
|
|
width: 40
|
|
|
|
height: 40
|
2017-07-20 02:24:18 +00:00
|
|
|
source: "qrc:///mapwidget-toggle-" + (map.activeMapType === map.mapType.SATELLITE ? "street" : "satellite")
|
|
|
|
SequentialAnimation {
|
|
|
|
id: toggleImageAnimation
|
2017-07-28 13:40:28 +00:00
|
|
|
PropertyAnimation { target: toggleImage; property: "scale"; from: 1.0; to: 0.8; duration: 120 }
|
|
|
|
PropertyAnimation { target: toggleImage; property: "scale"; from: 0.8; to: 1.0; duration: 80 }
|
2017-07-20 02:24:18 +00:00
|
|
|
}
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: {
|
|
|
|
map.activeMapType = map.activeMapType === map.mapType.SATELLITE ? map.mapType.STREET : map.mapType.SATELLITE
|
|
|
|
toggleImageAnimation.restart()
|
2017-07-20 00:07:47 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-14 14:53:08 +00:00
|
|
|
}
|
2017-07-20 13:58:21 +00:00
|
|
|
|
2017-07-25 15:55:36 +00:00
|
|
|
Image {
|
|
|
|
id: imageZoomIn
|
|
|
|
x: 10 + (toggleImage.width - imageZoomIn.width) * 0.5; y: toggleImage.y + toggleImage.height + 10
|
2017-07-31 19:43:19 +00:00
|
|
|
width: 20
|
|
|
|
height: 20
|
2017-07-25 15:55:36 +00:00
|
|
|
source: "qrc:///mapwidget-zoom-in"
|
|
|
|
SequentialAnimation {
|
|
|
|
id: imageZoomInAnimation
|
2017-07-28 13:40:28 +00:00
|
|
|
PropertyAnimation { target: imageZoomIn; property: "scale"; from: 1.0; to: 0.8; duration: 120 }
|
|
|
|
PropertyAnimation { target: imageZoomIn; property: "scale"; from: 0.8; to: 1.0; duration: 80 }
|
2017-07-25 15:55:36 +00:00
|
|
|
}
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: {
|
2017-11-25 22:10:08 +00:00
|
|
|
map.stopZoomAnimations()
|
2017-07-25 15:55:36 +00:00
|
|
|
map.newCenter = map.center
|
|
|
|
map.newZoom = map.zoomLevel + map.zoomStep
|
|
|
|
if (map.newZoom > map.maximumZoomLevel)
|
|
|
|
map.newZoom = map.maximumZoomLevel
|
|
|
|
mapAnimationClick.restart()
|
|
|
|
imageZoomInAnimation.restart()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
Image {
|
|
|
|
id: imageZoomOut
|
|
|
|
x: imageZoomIn.x; y: imageZoomIn.y + imageZoomIn.height + 10
|
|
|
|
source: "qrc:///mapwidget-zoom-out"
|
2017-07-31 19:43:19 +00:00
|
|
|
width: 20
|
|
|
|
height: 20
|
2017-07-25 15:55:36 +00:00
|
|
|
SequentialAnimation {
|
|
|
|
id: imageZoomOutAnimation
|
2017-07-28 13:40:28 +00:00
|
|
|
PropertyAnimation { target: imageZoomOut; property: "scale"; from: 1.0; to: 0.8; duration: 120 }
|
|
|
|
PropertyAnimation { target: imageZoomOut; property: "scale"; from: 0.8; to: 1.0; duration: 80 }
|
2017-07-25 15:55:36 +00:00
|
|
|
}
|
|
|
|
MouseArea {
|
|
|
|
anchors.fill: parent
|
|
|
|
onClicked: {
|
2017-11-25 22:10:08 +00:00
|
|
|
map.stopZoomAnimations()
|
2017-07-25 15:55:36 +00:00
|
|
|
map.newCenter = map.center
|
|
|
|
map.newZoom = map.zoomLevel - map.zoomStep
|
|
|
|
mapAnimationClick.restart()
|
|
|
|
imageZoomOutAnimation.restart()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2017-07-21 13:26:33 +00:00
|
|
|
function openLocationInGoogleMaps(latitude, longitude) {
|
|
|
|
var loc = latitude + " " + longitude
|
|
|
|
var url = "https://www.google.com/maps/place/" + loc + "/@" + loc + ",5000m/data=!3m1!1e3!4m2!3m1!1s0x0:0x0"
|
|
|
|
Qt.openUrlExternally(url)
|
|
|
|
}
|
|
|
|
|
2017-07-20 13:58:21 +00:00
|
|
|
MapWidgetContextMenu {
|
|
|
|
id: contextMenu
|
2017-07-20 16:25:59 +00:00
|
|
|
y: 10; x: map.width - y
|
2017-07-20 22:28:58 +00:00
|
|
|
onActionSelected: {
|
|
|
|
switch (action) {
|
|
|
|
case contextMenu.actions.OPEN_LOCATION_IN_GOOGLE_MAPS:
|
2017-07-21 13:26:33 +00:00
|
|
|
openLocationInGoogleMaps(map.center.latitude, map.center.longitude)
|
2017-07-28 13:40:28 +00:00
|
|
|
break
|
2017-07-20 22:28:58 +00:00
|
|
|
case contextMenu.actions.COPY_LOCATION_DECIMAL:
|
2017-07-25 15:38:15 +00:00
|
|
|
mapHelper.copyToClipboardCoordinates(map.center, false)
|
2017-07-28 13:40:28 +00:00
|
|
|
break
|
2017-07-20 22:28:58 +00:00
|
|
|
case contextMenu.actions.COPY_LOCATION_SEXAGESIMAL:
|
2017-07-25 15:38:15 +00:00
|
|
|
mapHelper.copyToClipboardCoordinates(map.center, true)
|
2017-07-28 13:40:28 +00:00
|
|
|
break
|
2017-08-07 00:02:16 +00:00
|
|
|
case contextMenu.actions.SELECT_VISIBLE_LOCATIONS:
|
|
|
|
mapHelper.selectVisibleLocations()
|
|
|
|
break
|
2017-07-20 22:28:58 +00:00
|
|
|
}
|
|
|
|
}
|
2017-07-20 13:58:21 +00:00
|
|
|
}
|
2017-07-14 14:53:08 +00:00
|
|
|
}
|