IEEE.org
|
IEEE Xplore Digital Library
|
IEEE Standards
|
IEEE Spectrum
|
More Sites
Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
Open at RIT
My Conservation Life
Conservation360
Commits
ef10edb0
Commit
ef10edb0
authored
Feb 10, 2020
by
jedjas12
Browse files
Added map scale
parent
8972509a
Changes
2
Hide whitespace changes
Inline
Side-by-side
salesforce/my-conservation-life/force-app/main/default/lwc/geoQuery/geoQuery.js
View file @
ef10edb0
...
...
@@ -48,11 +48,10 @@ export default class GeoQuery extends LightningElement {
[
-
30.06909396443886
,
26.102030238912395
],
[
-
7.231698708367139
,
74.47760116029443
]]);
// Locks the map region to one earth.
// Locks the map region to one earth (prevents dragging)
map
.
setMaxBounds
([[
-
90
,
-
180
],[
90
,
180
]]);
// Implement map "on click" handler
// If we could keep a reference to the map via a class variable (this.map = event.detail) this would be a lot cleaner
// to bad this map doesn't wish to cooperate at the time being.
...
...
salesforce/my-conservation-life/force-app/main/default/lwc/map/map.js
View file @
ef10edb0
...
...
@@ -33,7 +33,8 @@ export default class Map extends LightningElement {
const
mapRoot
=
this
.
template
.
querySelector
(
'
.map-root
'
);
this
.
map
=
L
.
map
(
mapRoot
);
this
.
map
.
fitWorld
();
L
.
control
.
scale
().
addTo
(
this
.
map
);
}
/**
...
...
@@ -46,7 +47,9 @@ export default class Map extends LightningElement {
'
https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png
'
,
{
attribution
:
'
©
'
+
mapLink
+
'
Contributors
'
,
maxZoom
:
18
//minZoom: 4,
maxZoom
:
5
,
maxNativeZoom
:
5
})
.
addTo
(
this
.
map
);
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment