Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
R
Rocket.Chat
Manage
Activity
Members
Code
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Deploy
Releases
Package Registry
Model registry
Operate
Terraform modules
Analyze
Contributor analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
RocketChat
Rocket.Chat
Commits
c0fa2e5e
Commit
c0fa2e5e
authored
8 years ago
by
Gabriel Engel
Committed by
GitHub
8 years ago
Browse files
Options
Downloads
Plain Diff
Merge pull request #4052 from tgxn/develop
Handle shared locations better when new shares are disabled
parents
b14f2b21
223742b1
Loading
Loading
Loading
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
packages/rocketchat-lib/i18n/en.i18n.json
+1
-0
1 addition, 0 deletions
packages/rocketchat-lib/i18n/en.i18n.json
packages/rocketchat-mapview/client/mapview.coffee
+3
-2
3 additions, 2 deletions
packages/rocketchat-mapview/client/mapview.coffee
with
4 additions
and
2 deletions
packages/rocketchat-lib/i18n/en.i18n.json
+
1
−
0
View file @
c0fa2e5e
...
...
@@ -1030,6 +1030,7 @@
"Settings"
:
"Settings"
,
"Settings_updated"
:
"Settings updated"
,
"Share_Location_Title"
:
"Share Location?"
,
"Shared_Location"
:
"Shared Location"
,
"Should_be_a_URL_of_an_image"
:
"Should be a URL of an image."
,
"Should_exists_a_user_with_this_username"
:
"The user must already exist."
,
"Show_all"
:
"Show all"
,
...
...
This diff is collapsed.
Click to expand it.
packages/rocketchat-mapview/client/mapview.coffee
+
3
−
2
View file @
c0fa2e5e
...
...
@@ -7,10 +7,9 @@ class MapView
constructor
:
(
message
)
->
# get MapView settings
mv_enabled
=
RocketChat
.
settings
.
get
'MapView_Enabled'
mv_googlekey
=
RocketChat
.
settings
.
get
'MapView_GMapsAPIKey'
if
message
.
location
and
mv_enabled
if
message
.
location
# GeoJSON is reversed - ie. [lng, lat]
longitude
=
message
.
location
.
coordinates
[
0
]
...
...
@@ -19,6 +18,8 @@ class MapView
# confirm we have an api key set, and generate the html required for the mapview
if
mv_googlekey
?
.
length
message
.
html
=
'<a href="https://maps.google.com/maps?daddr='
+
latitude
+
','
+
longitude
+
'" target="_blank"><img src="https://maps.googleapis.com/maps/api/staticmap?zoom=14&size=250x250&markers=color:gray%7Clabel:%7C'
+
latitude
+
','
+
longitude
+
'&key='
+
mv_googlekey
+
'" /></a>'
else
message
.
html
=
'<a href="https://maps.google.com/maps?daddr='
+
latitude
+
','
+
longitude
+
'" target="_blank">'
+
TAPi18n
.
__
(
'Shared_Location'
)
+
'</a>'
return
message
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment