Google Maps View Android extra margin without tiles












0















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.



Bug










share|improve this question

























  • UPD - Updated image to better show the issue

    – Taras Leskiv
    Nov 29 '18 at 8:41
















0















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.



Bug










share|improve this question

























  • UPD - Updated image to better show the issue

    – Taras Leskiv
    Nov 29 '18 at 8:41














0












0








0








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.



Bug










share|improve this question
















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.



Bug







google-maps unity3d google-maps-android-api-2






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Nov 29 '18 at 8:41







Taras Leskiv

















asked Nov 26 '18 at 14:40









Taras LeskivTaras Leskiv

1,4181130




1,4181130













  • 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





UPD - Updated image to better show the issue

– Taras Leskiv
Nov 29 '18 at 8:41












1 Answer
1






active

oldest

votes


















1














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:



Map padding



Updated explanation



Map padding 2



For "small view in the middle of the screen" that small view should have parent layout for hiding invisible areas:



Map padding 3






share|improve this answer


























  • 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











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
});


}
});














draft saved

draft discarded


















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









1














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:



Map padding



Updated explanation



Map padding 2



For "small view in the middle of the screen" that small view should have parent layout for hiding invisible areas:



Map padding 3






share|improve this answer


























  • 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
















1














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:



Map padding



Updated explanation



Map padding 2



For "small view in the middle of the screen" that small view should have parent layout for hiding invisible areas:



Map padding 3






share|improve this answer


























  • 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














1












1








1







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:



Map padding



Updated explanation



Map padding 2



For "small view in the middle of the screen" that small view should have parent layout for hiding invisible areas:



Map padding 3






share|improve this answer















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:



Map padding



Updated explanation



Map padding 2



For "small view in the middle of the screen" that small view should have parent layout for hiding invisible areas:



Map padding 3







share|improve this answer














share|improve this answer



share|improve this answer








edited Nov 29 '18 at 10:31

























answered Nov 27 '18 at 9:34









Andrii OmelchenkoAndrii Omelchenko

8,05562553




8,05562553













  • 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











  • @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




















draft saved

draft discarded




















































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.




draft saved


draft discarded














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





















































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







Popular posts from this blog

A CLEAN and SIMPLE way to add appendices to Table of Contents and bookmarks

Calculate evaluation metrics using cross_val_predict sklearn

Insert data from modal to MySQL (multiple modal on website)