I've got a JQVMap set up on a single-page website, and am trying to get my map to display correctly on iphone, but for the life of me I can't figure out what is going wrong. Supposedly it is responsive and will scale 'out of the box', but I've tried media queries and fiddling with some resizing script I found on the example page, no luck.
I've set my world map div up according to the directions on the developer's page (http://jqvmap.com/), setting a width and height inline.
<div id="vmap" style="width: 600px; height: 400px;"></div>
Looking at the developer's page source, he does NOT set up an inline width and height, and he looks to use some scripting to set the width and height based on his pages container.
var map_width = (jQuery('#pages').width());
if(map_width > 480)
{
map_width -= 40;
}
jQuery('.map').css({ 'width': map_width + 'px', 'height': (map_width*.75)+ 'px' });
jQuery('#pages dd, #pages p, #pages div.inner').css({ 'width': map_width + 'px' });
I am a complete novice at scripting but happy to take a stab at things, and I managed get get the svg map to change it's width and height according to the container div, EXCEPT it was still cut off on the iphone.
I also tried using css, and set a max-width and max-height for my map's container div in my media queries - this didn't work, the map was still larger than the container and cut off.
I have these meta tags for responsive:
<meta name="viewport" content="width=device-width, minimum-scale=1.0, maximum-scale=1.0, user-scalable=no" />
<meta name="apple-mobile-web-app-capable" content="yes" />
What am I missing here? It seems like this should rescale 'out of the box', according to the documentation, and my map seems happy when I rescale my browser window - why wouldn't it scale on the iphone? Any help/direction/examples would be hugely appreciated!
I've also tried adding this to my .htaccess file: addtype image/svg+xml .svg
My iphone and ipad are running IOS 8.