Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
minerva
core
Commits
a8ae6bbd
Commit
a8ae6bbd
authored
Nov 23, 2020
by
Piotr Gawron
Browse files
google maps without background had some issues
parent
479cc04f
Pipeline
#34561
passed with stage
in 14 minutes and 24 seconds
Changes
3
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
CHANGELOG
View file @
a8ae6bbd
...
...
@@ -9,6 +9,8 @@ minerva (15.1.1) stable; urgency=medium
example
P0C2L1
)
could
crash
caching
(#
1377
)
*
Bug
fix
:
removing
non
-
existing
project
results
in
warning
not
an
error
message
(#
1367
)
*
Bug
fix
:
opening
map
in
google
maps
without
background
resulted
in
unexpected
error
(#
1416
)
--
Piotr
Gawron
<
piotr
.
gawron
@
uni
.
lu
>
Thu
,
23
Nov
2020
15
:
00
:
00
+
0200
...
...
frontend-js/src/main/js/map/canvas/GoogleMaps/GoogleMapsApiCanvas.js
View file @
a8ae6bbd
...
...
@@ -136,7 +136,11 @@ GoogleMapsApiCanvas.prototype.setupBackgroundOverlays = function (backgroundOver
var
mapType
=
new
google
.
maps
.
ImageMapType
(
typeOptions
);
this
.
getGoogleMap
().
mapTypes
.
set
(
overlay
.
id
.
toString
(),
mapType
);
}
this
.
getGoogleMap
().
setMapTypeId
(
backgroundOverlays
[
0
].
id
.
toString
());
if
(
backgroundOverlays
[
0
]
!==
undefined
)
{
this
.
getGoogleMap
().
setMapTypeId
(
backgroundOverlays
[
0
].
id
.
toString
());
}
else
{
this
.
getGoogleMap
().
setMapTypeId
(
'
none
'
);
}
};
/**
...
...
frontend-js/src/test/js/map/canvas/GoogleMaps/GoogleMapsApiCanvas-test.js
View file @
a8ae6bbd
...
...
@@ -58,6 +58,20 @@ describe('GoogleMapsApiCanvas', function () {
assert
.
ok
(
result
);
});
it
(
"
no background overlays
"
,
function
()
{
var
options
=
{
center
:
new
Point
(
0
,
0
),
tileSize
:
256
,
width
:
300
,
height
:
600
,
minZoom
:
2
,
zoom
:
5
,
backgroundOverlays
:
[]
};
var
canvas
=
new
GoogleMapsApiCanvas
(
testDiv
,
options
);
assert
.
ok
(
canvas
);
});
it
(
"
getTileUrl
"
,
function
()
{
var
coordinates
=
{
x
:
0
,
y
:
0
};
var
canvas
=
new
GoogleMapsApiCanvas
(
testDiv
,
testOptions
);
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment