Make sure that you don't have any scaling in object mode. This may result in stretched uvs. Something else that may help is, if you want to preserve the size from 3d to uv, you may select the faces that are facing the camera (so in the 3d viewport) and uv unwrap from view.
I loaded Google Maps API v3 and print Google Map in
div
. But when set width & height to 100% and auto I can't see the Map.Here is HTML code snippet.
Is there a way to fix this issue?
Madan Sapkota17.2k77 gold badges8686 silver badges100100 bronze badges
BBKingBBKing95977 gold badges2929 silver badges4343 bronze badges
12 Answers
You have to set all parent containers to a 100% width if you want to cover the whole page with it. You have to set an absolute value at width and height for the #content div at the very least.
MachielMachiel
Setting Map Container to position to relative do the trick. Here is HTML.
And Simple CSS.
Tested on all browsers. Here is the Screenshot.
Madan SapkotaMadan Sapkota17.2k77 gold badges8686 silver badges100100 bronze badges
![Blender Blender](https://static1.squarespace.com/static/523680a4e4b0a4a590e8c091/t/5309772fe4b0c194bcbc7f66/1393129264927/AcuteAngleClipping.png)
Very few people realize the power of css positioning. To set the map to occupy 100% height of it's parent container do following:
#map_canvas_container {position: relative;}
#map_canvas {position: absolute; top: 0; right: 0; bottom: 0; left: 0;}
If you have any non absolutely positioned elements inside #map_canvas_container they will set the height of it and the map will take the exact available space.
YaroslavS120YaroslavS120
MostafaMostafa42411 gold badge77 silver badges1414 bronze badges
Gmap writes inline style position to relative to the div. Overwrite that with :
Hope it helps.
abhilashvabhilashv
Naresh ChennuriNaresh Chennuri
If you can't affect your parents elements (like in a nested components situation) you can use
height: 100vh
which will make it a full window (=view) height;YoniXwYoniXw
Better late than never! I made mine a class:
and then
developer68developer68
Juan G. HurtadoJuan G. Hurtado
I struggled a lot to find the answer.
You don't really need to do anything with body size. All you need to remove the inline style from the map code:
remove all the inline style and add class or ID and then style it the way you like.
AndyAndy
Vilas ChavanVilas Chavan
I just added inline style .
And it worked for me .
Nikhil_K_RNikhil_K_R<div></div>
And it worked for me .
2,13055 gold badges2121 silver badges5050 bronze badges