Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Open sidebar
cto
g1
Commits
3e102eab
Commit
3e102eab
authored
Apr 01, 2019
by
Tejesh
🖖
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
check validity of bounds before fitbound
parent
9ba67cc3
Pipeline
#81256
failed with stage
in 2 minutes and 11 seconds
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
2 deletions
+3
-2
src/mapviewer.js
src/mapviewer.js
+3
-2
No files found.
src/mapviewer.js
View file @
3e102eab
...
...
@@ -146,7 +146,7 @@ MapViewer.prototype.cacheData = function (layerName, url) {
return
self
.
gData
[
url
]
}()
case
'
object
'
:
this
.
gData
[
hashCode
(
JSON
.
stringify
(
url
))]
=
url
//
this.gData[hashCode(JSON.stringify(url))] = url
// TODO: Reload all layers that use this data
// This part will make mapviewer data reactive
return
async
function
()
{
...
...
@@ -569,7 +569,8 @@ MapViewer.prototype.zoomHandler = function (layerName, minZoom, maxZoom) {
*/
MapViewer
.
prototype
.
fitToLayer
=
function
(
layerName
,
options
=
this
.
options
.
fitbounds
)
{
var
layer
=
typeof
(
layerName
)
==
'
string
'
?
this
.
gLayers
[
layerName
]
:
layerName
this
.
map
.
fitBounds
(
layer
.
getBounds
(),
options
)
if
(
layer
.
getBounds
().
isValid
())
this
.
map
.
fitBounds
(
layer
.
getBounds
(),
options
)
}
function
dataOrURL
(
conf
)
{
...
...
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