bjornd / jvectormap

jvectormap.com
GNU Affero General Public License v3.0
1.38k stars 430 forks source link

How to make map responsive? #399

Closed nicolagordon closed 7 years ago

nicolagordon commented 7 years ago

Hi,

Is there some way for me to make my map responsive, or is there an updated version of JVectorMap that supports this? It is unusable via my mobile device in it's current format - when holding my device in 'portrait' orientation only half the map can be seen since it doesn't resize.

I tried implementing a suggestion by @bjornd from a different post: [https://github.com/bjornd/jvectormap/issues/273] I tried calling setFocus (I describe my efforts on that post), but I wasn't able to get it working.

Can someone advise - any input would be great - thanks,

bjornd commented 7 years ago

To make a jVectorMap responsive you off course need to make its container responsive. From you example in #273 I see you container has fixed width and height. Just deal with container first, jVectorMap component will catch up with it.