Google Maps View Android extra margin without tiles
.everyoneloves__top-leaderboard:empty,.everyoneloves__mid-leaderboard:empty,.everyoneloves__bot-mid-leaderboard:empty{ height:90px;width:728px;box-sizing:border-box;
}
I am experiencing this white margin where tiles are missing only on some devices like Huawei with a 16:9 screen like the P20 Smart. You can see that the view size is correct as the buttons are placed correctly just the tiles are not loaded correctly. I am pretty sure it's some internal issue of Google Maps SDK but any clues how to fix it would be appreciated.
The view is shown as a dialog on top of Unity game.
google-maps unity3d google-maps-android-api-2
add a comment |
I am experiencing this white margin where tiles are missing only on some devices like Huawei with a 16:9 screen like the P20 Smart. You can see that the view size is correct as the buttons are placed correctly just the tiles are not loaded correctly. I am pretty sure it's some internal issue of Google Maps SDK but any clues how to fix it would be appreciated.
The view is shown as a dialog on top of Unity game.
google-maps unity3d google-maps-android-api-2
UPD - Updated image to better show the issue
– Taras Leskiv
Nov 29 '18 at 8:41
add a comment |
I am experiencing this white margin where tiles are missing only on some devices like Huawei with a 16:9 screen like the P20 Smart. You can see that the view size is correct as the buttons are placed correctly just the tiles are not loaded correctly. I am pretty sure it's some internal issue of Google Maps SDK but any clues how to fix it would be appreciated.
The view is shown as a dialog on top of Unity game.
google-maps unity3d google-maps-android-api-2
I am experiencing this white margin where tiles are missing only on some devices like Huawei with a 16:9 screen like the P20 Smart. You can see that the view size is correct as the buttons are placed correctly just the tiles are not loaded correctly. I am pretty sure it's some internal issue of Google Maps SDK but any clues how to fix it would be appreciated.
The view is shown as a dialog on top of Unity game.
google-maps unity3d google-maps-android-api-2
google-maps unity3d google-maps-android-api-2
edited Nov 29 '18 at 8:41
Taras Leskiv
asked Nov 26 '18 at 14:40
Taras LeskivTaras Leskiv
1,4281130
1,4281130
UPD - Updated image to better show the issue
– Taras Leskiv
Nov 29 '18 at 8:41
add a comment |
UPD - Updated image to better show the issue
– Taras Leskiv
Nov 29 '18 at 8:41
UPD - Updated image to better show the issue
– Taras Leskiv
Nov 29 '18 at 8:41
UPD - Updated image to better show the issue
– Taras Leskiv
Nov 29 '18 at 8:41
add a comment |
1 Answer
1
active
oldest
votes
Anyway, you can set size of your map view larger then screen and use Map padding for correct placing of map controls and Google logo. Something like that:
Updated explanation
For "small view in the middle of the screen" that small view should have parent layout for hiding invisible areas:
Thanks, I know about this workaround and it works fine when the map needs to be fullscreen but if you want to display a small view in the middle of the screen that won't work.
– Taras Leskiv
Nov 28 '18 at 10:04
@TarasLeskiv Hmm, actually it's possible to create MapView (MapFragment) with any size (in dp or pixels).
– Andrii Omelchenko
Nov 28 '18 at 11:31
yes, but that's where whites space on the bottom and right appears that I don't know how to get rid of
– Taras Leskiv
Nov 29 '18 at 8:39
1
@TarasLeskiv So, set the size of MapView larger than view port. White spaces should go outside view port, to invisible area in that case. In that case required to show "Google" sign and map controls ("+/-" buttons and current location button) also goes to invisible area, but you can return them back with Map Padding. So use padding not for map padding itself, but for returning back Google logo and map controls.
– Andrii Omelchenko
Nov 29 '18 at 9:23
@TarasLeskiv Please see updated picture.
– Andrii Omelchenko
Nov 29 '18 at 9:39
|
show 2 more comments
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53483473%2fgoogle-maps-view-android-extra-margin-without-tiles%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
Anyway, you can set size of your map view larger then screen and use Map padding for correct placing of map controls and Google logo. Something like that:
Updated explanation
For "small view in the middle of the screen" that small view should have parent layout for hiding invisible areas:
Thanks, I know about this workaround and it works fine when the map needs to be fullscreen but if you want to display a small view in the middle of the screen that won't work.
– Taras Leskiv
Nov 28 '18 at 10:04
@TarasLeskiv Hmm, actually it's possible to create MapView (MapFragment) with any size (in dp or pixels).
– Andrii Omelchenko
Nov 28 '18 at 11:31
yes, but that's where whites space on the bottom and right appears that I don't know how to get rid of
– Taras Leskiv
Nov 29 '18 at 8:39
1
@TarasLeskiv So, set the size of MapView larger than view port. White spaces should go outside view port, to invisible area in that case. In that case required to show "Google" sign and map controls ("+/-" buttons and current location button) also goes to invisible area, but you can return them back with Map Padding. So use padding not for map padding itself, but for returning back Google logo and map controls.
– Andrii Omelchenko
Nov 29 '18 at 9:23
@TarasLeskiv Please see updated picture.
– Andrii Omelchenko
Nov 29 '18 at 9:39
|
show 2 more comments
Anyway, you can set size of your map view larger then screen and use Map padding for correct placing of map controls and Google logo. Something like that:
Updated explanation
For "small view in the middle of the screen" that small view should have parent layout for hiding invisible areas:
Thanks, I know about this workaround and it works fine when the map needs to be fullscreen but if you want to display a small view in the middle of the screen that won't work.
– Taras Leskiv
Nov 28 '18 at 10:04
@TarasLeskiv Hmm, actually it's possible to create MapView (MapFragment) with any size (in dp or pixels).
– Andrii Omelchenko
Nov 28 '18 at 11:31
yes, but that's where whites space on the bottom and right appears that I don't know how to get rid of
– Taras Leskiv
Nov 29 '18 at 8:39
1
@TarasLeskiv So, set the size of MapView larger than view port. White spaces should go outside view port, to invisible area in that case. In that case required to show "Google" sign and map controls ("+/-" buttons and current location button) also goes to invisible area, but you can return them back with Map Padding. So use padding not for map padding itself, but for returning back Google logo and map controls.
– Andrii Omelchenko
Nov 29 '18 at 9:23
@TarasLeskiv Please see updated picture.
– Andrii Omelchenko
Nov 29 '18 at 9:39
|
show 2 more comments
Anyway, you can set size of your map view larger then screen and use Map padding for correct placing of map controls and Google logo. Something like that:
Updated explanation
For "small view in the middle of the screen" that small view should have parent layout for hiding invisible areas:
Anyway, you can set size of your map view larger then screen and use Map padding for correct placing of map controls and Google logo. Something like that:
Updated explanation
For "small view in the middle of the screen" that small view should have parent layout for hiding invisible areas:
edited Nov 29 '18 at 10:31
answered Nov 27 '18 at 9:34
Andrii OmelchenkoAndrii Omelchenko
8,38762656
8,38762656
Thanks, I know about this workaround and it works fine when the map needs to be fullscreen but if you want to display a small view in the middle of the screen that won't work.
– Taras Leskiv
Nov 28 '18 at 10:04
@TarasLeskiv Hmm, actually it's possible to create MapView (MapFragment) with any size (in dp or pixels).
– Andrii Omelchenko
Nov 28 '18 at 11:31
yes, but that's where whites space on the bottom and right appears that I don't know how to get rid of
– Taras Leskiv
Nov 29 '18 at 8:39
1
@TarasLeskiv So, set the size of MapView larger than view port. White spaces should go outside view port, to invisible area in that case. In that case required to show "Google" sign and map controls ("+/-" buttons and current location button) also goes to invisible area, but you can return them back with Map Padding. So use padding not for map padding itself, but for returning back Google logo and map controls.
– Andrii Omelchenko
Nov 29 '18 at 9:23
@TarasLeskiv Please see updated picture.
– Andrii Omelchenko
Nov 29 '18 at 9:39
|
show 2 more comments
Thanks, I know about this workaround and it works fine when the map needs to be fullscreen but if you want to display a small view in the middle of the screen that won't work.
– Taras Leskiv
Nov 28 '18 at 10:04
@TarasLeskiv Hmm, actually it's possible to create MapView (MapFragment) with any size (in dp or pixels).
– Andrii Omelchenko
Nov 28 '18 at 11:31
yes, but that's where whites space on the bottom and right appears that I don't know how to get rid of
– Taras Leskiv
Nov 29 '18 at 8:39
1
@TarasLeskiv So, set the size of MapView larger than view port. White spaces should go outside view port, to invisible area in that case. In that case required to show "Google" sign and map controls ("+/-" buttons and current location button) also goes to invisible area, but you can return them back with Map Padding. So use padding not for map padding itself, but for returning back Google logo and map controls.
– Andrii Omelchenko
Nov 29 '18 at 9:23
@TarasLeskiv Please see updated picture.
– Andrii Omelchenko
Nov 29 '18 at 9:39
Thanks, I know about this workaround and it works fine when the map needs to be fullscreen but if you want to display a small view in the middle of the screen that won't work.
– Taras Leskiv
Nov 28 '18 at 10:04
Thanks, I know about this workaround and it works fine when the map needs to be fullscreen but if you want to display a small view in the middle of the screen that won't work.
– Taras Leskiv
Nov 28 '18 at 10:04
@TarasLeskiv Hmm, actually it's possible to create MapView (MapFragment) with any size (in dp or pixels).
– Andrii Omelchenko
Nov 28 '18 at 11:31
@TarasLeskiv Hmm, actually it's possible to create MapView (MapFragment) with any size (in dp or pixels).
– Andrii Omelchenko
Nov 28 '18 at 11:31
yes, but that's where whites space on the bottom and right appears that I don't know how to get rid of
– Taras Leskiv
Nov 29 '18 at 8:39
yes, but that's where whites space on the bottom and right appears that I don't know how to get rid of
– Taras Leskiv
Nov 29 '18 at 8:39
1
1
@TarasLeskiv So, set the size of MapView larger than view port. White spaces should go outside view port, to invisible area in that case. In that case required to show "Google" sign and map controls ("+/-" buttons and current location button) also goes to invisible area, but you can return them back with Map Padding. So use padding not for map padding itself, but for returning back Google logo and map controls.
– Andrii Omelchenko
Nov 29 '18 at 9:23
@TarasLeskiv So, set the size of MapView larger than view port. White spaces should go outside view port, to invisible area in that case. In that case required to show "Google" sign and map controls ("+/-" buttons and current location button) also goes to invisible area, but you can return them back with Map Padding. So use padding not for map padding itself, but for returning back Google logo and map controls.
– Andrii Omelchenko
Nov 29 '18 at 9:23
@TarasLeskiv Please see updated picture.
– Andrii Omelchenko
Nov 29 '18 at 9:39
@TarasLeskiv Please see updated picture.
– Andrii Omelchenko
Nov 29 '18 at 9:39
|
show 2 more comments
Thanks for contributing an answer to Stack Overflow!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fstackoverflow.com%2fquestions%2f53483473%2fgoogle-maps-view-android-extra-margin-without-tiles%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
UPD - Updated image to better show the issue
– Taras Leskiv
Nov 29 '18 at 8:41