Permalink
Browse files

new countries added

adding support for relative path to map
  • Loading branch information...
ricki-z committed Jan 30, 2018
1 parent add080b commit 2690e53e92a8e4081f186f2c9a1cd95a458ee049
Showing with 46 additions and 9 deletions.
  1. +6 −1 src/countries.txt
  2. +8 −4 src/main.js
  3. +1 −1 src/map.vue
  4. +17 −0 src/places.js
  5. +0 −1 src/style.styl
  6. +14 −2 src/zooms.js
@@ -14,6 +14,7 @@
// Europe CH Suisse
// America CL Chile
// Africa CM Cameroon
// America CR Costa Rica
// Europe CZ Czech Republic
// Europe DE Germany
// * Europe DK Denmark
@@ -32,19 +33,23 @@
// Asia KR Republic of Korea
// Europe LU Luxembourg
// Europe LV Latvia
// Europe MK Macedonia
// America MX Mexico
// Africa NG Nigeria
// Europe NL Netherlands
// Europe NO Norway
// Asia NP Nepal
// America PE Peru
// Asia PH Philippines (nur externe Sensoren via MQTT)
// Europe PL Poland
// Europe PT Portugal
// Europe RO Romania
// Europe RS Serbia
// Europe SE Sweden
// Europe SI Slovenia
// * Asia TW Taiwan (nur externe Sensoren)
// * Asia TH Thailand
// Asia TR Turkey
// * Asia TW Taiwan (nur externe Sensoren via MQTT)
// Africa TZ Tanzania
// * Europe UA Ukraine
// Europe UK United Kingdom
@@ -14,14 +14,18 @@ console.log(query)
window.onpopstate = function(event) {
if ((typeof location.search !== 'undefined') && (typeof location.hash !== 'undefined') && (location.hash !== '')) {
var new_location = location.protocol+'//'+location.host+'/';
if (typeof location.path !== 'undefined') {
new_location += location.path;
if (typeof location.pathname !== 'undefined') {
var path = location.pathname;
path = path.substring(0, path.lastIndexOf('/') + 1);
} else {
var path = "/";
}
var new_location = location.protocol+'//'+location.host+path;
if (typeof location.hash !== 'undefined') {
new_location += location.hash;
}
// alert(new_location);
console.log("New location: "+new_location);
// location.replace(new_location);
history.pushState('remove_query', null, new_location);
}
@@ -16,7 +16,7 @@ export default {
center: config.center,
zoom: config.zoom
})
leaflet.tileLayer('https://tiles.madavi.de/{z}/{x}/{y}.png', {
leaflet.tileLayer('https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
attribution: 'Map data © <a href="https://openstreetmap.org">OpenStreetMap</a> contributors',
maxZoom: 13,
// continuousWorld: false,
@@ -300,13 +300,18 @@ module.exports = {
"palermo": [38.1158,13.3614],
"bologna": [44.4939,11.3428],
"turin": [45.0667,7.7],
"rome": [41.9,12.5],
// Latvia
"latvia": [57,25],
"riga": [56.9490,24.1060],
// Luxembourg
"luxembourg": [49.85,6],
// Macedonia
"macedonia": [41.6,21.7],
"skopje": [42,21.43],
// Netherlands
"netherlands": [51.6,5.5667],
@@ -415,11 +420,18 @@ module.exports = {
"colombia": [4,-72],
"bogota": [4.66,-74.0722],
// Costa Rica
"costa-rica": [9.5,-84],
// Dominican Republic
"dominican-republic": [19,-70.6667],
"santo-domingo": [18.4667,-69.95],
"puerto-plata": [19.8030,-70.6830],
// Mexico
"mexico": [23,-102],
"mexico-city": [19.433, -99.133],
// Peru
"peru": [-8.233,-76.017],
"lima": [-12.043333,-77.028333],
@@ -459,6 +471,11 @@ module.exports = {
// Thailand
"thailand": [15.4,101.3],
// Turkey
"turkey": [39,35],
"ankara": [39.9,32.8],
"istanbul": [41,29],
// United Arab Emirates
"united-arab-emirates": [24,54],
"uae": [24,54],
@@ -66,4 +66,3 @@ body, #content
img.leaflet-tile
filter grayscale(85%) saturate(150%) hue-rotate(60deg) contrast(90%) brightness(110%)
@@ -68,7 +68,10 @@ module.exports = {
// Luxembourg
"luxembourg": 9,
// Macedonia
"macedonia": 9,
// Netherlands
"netherlands": 7,
@@ -148,12 +151,18 @@ module.exports = {
// Colombia
"colombia": 5,
// Costa Rica
"costa-rica": 8,
// Dominican Republic
"dominican-republic": 8,
// Mexico
"mexico": 5,
// Peru
"peru": 5,
// USA
"usa": 4,
@@ -184,6 +193,9 @@ module.exports = {
// Thailand
"thailand": 5,
// Turkey
"turkey": 6,
// United Arab Emirates
"united-arab-emirates": 7,
"uae": 7,

0 comments on commit 2690e53

Please sign in to comment.