How do i scale the google maps api to scale correctly on iphone and ipad? on iphone it looks good, but on the ipad it gets like this:
Hi Lars,
Take a look at here please:
https://getsatisfaction.com/apperyio/...
Thanks for the reply! The answer there is for full screen, but since i have some buttons and such im not sure that will work for me? Either way, i think this code will work, but im not sure where to put it in?
// googleMap default height: 220px, width: auto
var viewport_height = $(window).height();
if (viewport_height 500) {
$('div[dsid="googleMap"]').height('440px');
}
Hi Lars,
Your part of the code is just sets 440px (default 220px) height for Google maps component, when window height more then 500px.
You can edit this code in accordance with your needs.
You can place this code in JavaScript event handler on the page load event. http://prntscr.com/36inrm/direct
precode
// googleMap default height: 220px, width: auto
var viewport_height = $(window).height();
if (viewport_height > 500) {
$('div[dsid="googleMap"]').height('440px');
}
/code/pre
Note: "googleMap" is a Google maps component name. You should change it with yours.
Regards.
Thanks! It seems to work! Now as i understand, this will work good as a size on the ipad?
Yes, it should work on all devices.