Skip to content

Commit

Permalink
map
Browse files Browse the repository at this point in the history
  • Loading branch information
strukturart committed Jul 25, 2024
1 parent d273222 commit f814255
Show file tree
Hide file tree
Showing 69 changed files with 885 additions and 6,727 deletions.
2 changes: 1 addition & 1 deletion application/assets/css/leaflet.css
Original file line number Diff line number Diff line change
Expand Up @@ -399,7 +399,7 @@ svg.leaflet-image-layer.leaflet-interactive path {

/* Default icon URLs */
.leaflet-default-icon-path {
background-image: url("./marker-icon.png");
background-image: url("marker-icon.png");
}

/* attribution and scale controls */
Expand Down
35 changes: 19 additions & 16 deletions application/assets/css/main.css
Original file line number Diff line number Diff line change
Expand Up @@ -106,9 +106,14 @@ label {
}

article img {
max-width: 90vw;
width: 100%;
height: auto;
display: block;
padding: 10px;
}

#chat {
padding: 40px 0 40px 0;
}

img[src=""] {
Expand Down Expand Up @@ -388,6 +393,10 @@ div#intro img {
min-width: 100vw;
}

#app {
max-width: 500px;
}

/*///////////////////////////
///TOAST////////////////*/

Expand Down Expand Up @@ -661,6 +670,9 @@ article {
margin: 0 0 10px 0;
padding: 3px;
width: 100%;
position: relative;
max-width: 400px;
overflow: hidden;
}

article div.user-date {
Expand All @@ -677,15 +689,10 @@ article img {
}
article .message-map {
width: 100%;
min-width: 100%;
max-height: 100px;
}
article .map-component {
width: 100%;
min-width: 100%;
height: 100px;
max-height: 100px;
overflow: hidden;
height: 150px;
position: relative;
background: url("map.png");
background-size: cover;
}

[id*="page-"] {
Expand Down Expand Up @@ -786,10 +793,6 @@ article.me div.message-main {
padding: 5px 5px 5px 5px;
}

article div.message-main:empty {
display: none;
}

article.image {
background-color: none;
}
Expand Down Expand Up @@ -966,8 +969,8 @@ div#message-input input {

@media screen and (min-width: 1500px) and (max-width: 3000px) {
#app {
min-width: 100%;
max-width: 100%;
min-width: 400px;
max-width: 400px;
overflow: scroll;
padding: 50px 0 0 0;
}
Expand Down
Binary file added application/assets/css/map.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
19 changes: 9 additions & 10 deletions application/assets/js/helper.js
Original file line number Diff line number Diff line change
Expand Up @@ -112,21 +112,20 @@ export const geolocation = function (
};

let error = function (error) {
console.log(error.code);
alert("Current location not available");

switch (error.code) {
case error.PERMISSION_DENIED:
side_toaster("Location not provided", 2000);
side_toaster("Location not provided", 5000);
break;
case error.POSITION_UNAVAILABLE:
side_toaster("Current location not available", 2000);
side_toaster("Current location not available", 5000);
break;
case error.TIMEOUT:
case 3:
side_toaster("Current location not available", 2000);
side_toaster("Current location not available", 5000);
break;
default:
side_toaster("Current location not available", 2000);
side_toaster("Current location not available", 5000);
break;
}

Expand All @@ -151,15 +150,15 @@ export const geolocation = function (
error,
{
enableHighAccuracy: true,
timeout: 40000,
maximumAge: 0,
timeout: 20000,
maximumAge: 1000,
}
);
} else {
navigator.geolocation.getCurrentPosition(showPosition, error, {
enableHighAccuracy: true,
timeout: 40000,
maximumAge: 0,
timeout: 20000,
maximumAge: 1000,
});
}
} else {
Expand Down
Loading

0 comments on commit f814255

Please sign in to comment.