summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcus Lundblad <ml@update.uu.se>2021-02-20 15:23:43 +0100
committerMarcus Lundblad <ml@update.uu.se>2021-04-01 23:29:03 +0200
commit7e12c8ed73ebb1d951ff0c099c6eeb3816659294 (patch)
tree2221449e599629d879fe58b10172157347e85b41 /src
parent4ad7909be1a359b569f690dfc4a35f67698f2d12 (diff)
downloadgnome-maps-7e12c8ed73ebb1d951ff0c099c6eeb3816659294.tar.gz
Add constants module
Add module with common constants, for now containing coordinate constrains nessesary to re-implement the bounding box from libchamplain.
Diffstat (limited to 'src')
-rw-r--r--src/constants.js28
-rw-r--r--src/org.gnome.Maps.src.gresource.xml1
2 files changed, 29 insertions, 0 deletions
diff --git a/src/constants.js b/src/constants.js
new file mode 100644
index 00000000..a3419ec7
--- /dev/null
+++ b/src/constants.js
@@ -0,0 +1,28 @@
+/* -*- Mode: JS2; indent-tabs-mode: nil; js2-basic-offset: 4 -*- */
+/* vim: set et ts=4 sw=4: */
+/*
+ * Copyright (c) 2021, Marcus Lundblad
+ *
+ * GNOME Maps is free software; you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by the
+ * Free Software Foundation; either version 2 of the License, or (at your
+ * option) any later version.
+ *
+ * GNOME Maps is distributed in the hope that it will be useful, but
+ * WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
+ * or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
+ * for more details.
+ *
+ * You should have received a copy of the GNU General Public License along
+ * with GNOME Maps; if not, see <http://www.gnu.org/licenses/>.
+ *
+ * Author: Marcus Lundblad <ml@update.uu.se>
+ */
+
+/**
+ * Constraints of visible location in the standard Mercaartor projection.
+ */
+var MIN_LATITUDE = -85.0511287798;
+var MAX_LATITUDE = 85.0511287798;
+var MIN_LONGITUDE = -180;
+var MAX_LONGITUDE = 180;
diff --git a/src/org.gnome.Maps.src.gresource.xml b/src/org.gnome.Maps.src.gresource.xml
index af1f606b..70fa7df9 100644
--- a/src/org.gnome.Maps.src.gresource.xml
+++ b/src/org.gnome.Maps.src.gresource.xml
@@ -9,6 +9,7 @@
<file>color.js</file>
<file>contactPlace.js</file>
<file>contextMenu.js</file>
+ <file>constants.js</file>
<file>epaf.js</file>
<file>exportViewDialog.js</file>
<file>facebookBackend.js</file>