Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

jVectorMap increase (world) map size

I am using the jVectorMap from http://jvectormap.owl-hollow.net/ and everything works fine. But the standard size of the world-en map is very small. If someone wants to hit for example Bosnia and Herzegovina, he needs big glasses! There are zoom Buttons available but then you have to move the map within the container.

I tried to enlarge the div element but it seems that the map has a fixed size. To help me provida a bigger world map:

  • is there any chance to get a different standard-zoom when a user enters the map website?
  • do I need a bigger world map?

Or what else could I do in order to provide a bigger world map?

Cheers!

like image 972
Ajin Avatar asked Oct 12 '11 15:10

Ajin


2 Answers

Within the file jquery-jvectormap.js is the code:

WorldMap.prototype = {
  transX: 0,
  transY: 0,
  scale: 1,
  baseTransX: 0,
  baseTransY: 0,
  baseScale: 1,

I just changed scale: to 3 and that seems to work

like image 109
Steve Avatar answered Nov 08 '22 19:11

Steve


you just have to change these values:

$('#world-map').vectorMap({
        map: 'chile',
           focusOn: {
       x: 0.6,
       y: -0.2,
       scale: 2
     },
like image 34
Manuel Suricastro Avatar answered Nov 08 '22 19:11

Manuel Suricastro