Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Branch: stable
Commits on Sep 23, 2013
  1. @peter-schmalfeldt
Commits on Aug 15, 2013
  1. Merge pull request #83 from Reddine/stable

    authored
    added political map of Algeria
  2. Merge pull request #71 from BFallert/patch-1

    authored
    Update germany.html
  3. Merge pull request #74 from doobinay/stable

    authored
    Update jquery.vmap.france.js
  4. Merge pull request #77 from elmeerr/patch-1

    authored
    Brazilian Map
Commits on Jul 18, 2013
  1. @Reddine

    added political map of Algeria

    Reddine authored
Commits on May 17, 2013
  1. @elmeerr

    Brazilian Map

    elmeerr authored
    Map with Brazil's federal division
Commits on Apr 16, 2013
  1. @doobinay

    Update jquery.vmap.france.js

    doobinay authored
    Fixed FR-03, the name was overriden with an empty string.
Commits on Apr 2, 2013
  1. @BFallert

    Update germany.html

    BFallert authored
    without this line the german umlauts will not shown korrekt
Commits on Feb 18, 2013
  1. Merge pull request #56 from jbafford/feature/tooltip-position

    authored
    Don't allow the tooltip to be positioned outside the map's bounds
  2. Merge pull request #62 from stanfe/patch-1

    authored
    fix bug label showing
  3. Merge pull request #63 from stanfe/patch-2

    authored
    add isDefaultPrevented check for regionClickEvent
  4. Merge pull request #67 from fjarnet/patch-1

    authored
    Create jquery.vmap.france.js
  5. Merge pull request #68 from adeelnawaz/stable

    authored
    Added new maps and a sample html file
Commits on Feb 15, 2013
  1. @adeelnawaz

    This revision adds the functionality to place (html) pins on countrie…

    adeelnawaz authored
    …s. In addition to that, it adds zoomIn, zoomOut methods which can be called to zoom in or out of the map. It adds three events, bound to map's container. The details are as follows.
    
    Added events:
    _______________
    "drag": When the map is dragged, map.container triggers this event.
    "zoomIn": When the map is zoomed in, map.container triggers this event.
    "zoomOut": When the map is zoomed out, map.container triggers this event.
    
    Added parameters:
    _________________
    "pins": JSON which specifies the pins to be placed on the map.
    Example:
    {
    	"pk" : "pk_pin_metadata",
    	"ru" : "ru_pin_metadata",
    	...
    }
    
    There are two modes for placing pins:
    "pinMode":
    	1) "content" (default)
    	2) "id"
    
    If the pin mode is "content" (or not specified) then the parameter "pins" contains the html content to be placed in place of the pin.
    Example:
    {
    	"pk" : "\u003cimg src=\"images/pin.png\" /\u003e", //serialized <img src="images/pin.png" /> tag
    	...
    }
    
    If the pin mode is "id" then the parameter "pins" contains the "id" attribute of the html (DOM) object to be placed as pin.
    Example:
    {
    	"pk" : "pin_pk_id",
    	"ru" : "pin_for_russia",
    	...
    }
    ...
    ...
    </script>
    <div style="display:none">
    	<img id="pin_pk_id" src="images/pin.png" />
    	<div id="pin_for_russia">...</div>
    </div>
    
    The parameters "pins" and "pinMode" can be specified at the time of initialization:
    jQuery(document).ready(function() {
    	jQuery('#vmap').vectorMap({
    		map: 'world_en',
    		pins: {"ru":"\u003ca href=\"#\"\u003epin_ru\u003c/a\u003e", "pk":"\u003ca href=\"#\"\u003epin_pk\u003c/a\u003e"},
    		pinMode: 'content'
    	});
    });
    
    To add pins later, use placePins method (explained in the methods list).
    
    Note:
    _____
    1) The pin is placed at the center of the bounding box of related country. So depending on the shape of the country's map, the pin might not land on the country itself :(. For instance the pin for 'US' lands in the center of the united states and the state of alaska, and it is not ACTUALLY on the land of 'US'. It is rather placed in the ocean between them :P.
    2) If the "pinMode" is set as "id", then the html DOM element having the given id is NOT COPIED to the desired position, it IS MOVED. This means that the element will be removed from it's original position and will be added to the desired location on the map.
    
    Methods (functions):
    ____________________
    zoomIn(): It has the same effect as clicking on the zoom in button.
    Usage:
    jQuery('#vmap').vectorMap('zoomIn');
    
    zoomOut(): It has the same effect as clicking on the zoom out button.
    Usage:
    jQuery('#vmap').vectorMap('zoomOut');
    
    //Methods related to pinning
    getPinId(cc): Returns the html attribute "id" of the pin belonging to the country whose country code is provided in "cc". This method does not check if the pin physically exists.
    Usage:
    var pinId = jQuery('#vmap').vectorMap('getPinId', 'pk');
    
    placePins(pins, pinMode): This method is provided to place pins after the initialization of the map. The parameters "pins" and "pinMode" are explained earlier.
    Usage:
    jQuery('#vmap').vectorMap('placePins', pins[, pinMode]);
    If pinMode is unspecified, it is considered as "content".
    Note: Only one pin can be placed at a time on one country. So if a pin is placed on a country already having a pin, the older pin will be removed.
    
    positionPins(): To position the pins to their proper places (center of the bounding box of their respective country). This method is called automatically upon placing the pins, dragging, or zooming in/out.
    Usage: (Not so usable though)
    jQuery('#vmap').vectorMap('positionPins');
    
    getPin(cc): Returns a string containing the html of the pin placed on the country whose country code was specified in "cc".
    Usage:
    var pinContent = jQuery('#vmap').vectorMap('getPin', 'pk');
    
    getPins(): Returns a json STRING containing html strings of all the pins associated with the respective country codes.
    Example: {"ru":"\u003ca href=\"#\"\u003epin_ru\u003c/a\u003e", "pk":"\u003ca href=\"#\"\u003epin_pk\u003c/a\u003e"}
    Usage:
    var pins = jQuery('#vmap').vectorMap('getPins');
    
    removePin(cc): Removes the pin from the country whose country code is specified in "cc".
    Usage:
    jQuery('#vmap').vectorMap('removePin', 'pk');
    
    removePins(): Removes all the pins from the map.
    Usage:
    jQuery('#vmap').vectorMap('removePins');
    
    Variables (properties):
    _______________________
    pinHandlers: (bool)
    Usage:
    It is false by default. When the pins are placed for the first time, it is set to true. It performs as a check to make sure the pins are being placed for the first time. If so, the plugin binds the method "positionPins()" with the events "drag", "zoomIn", and "zoomOut". This makes sure that the event listener is assigned only once.
    Note: Not to be messed with externally.
    
    __________________________________________________________________________________________________________________
Commits on Feb 14, 2013
  1. @adeelnawaz
Commits on Feb 11, 2013
  1. @fjarnet

    Create jquery.vmap.france.js

    fjarnet authored
    French map with ISO 3166-2 standard
Commits on Jan 19, 2013
  1. fix bug label showing

    stanfe authored
Commits on Nov 29, 2012
  1. @jbafford
Commits on Nov 22, 2012
  1. Merge pull request #33 from dflemstr/stable

    authored
    Add methods for highlighting and selecting areas programmatically
  2. Merge pull request #39 from nikbelikov/stable

    authored
    added russian map
Commits on Oct 12, 2012
  1. @nikbelikov

    added russian map

    nikbelikov authored
Commits on Aug 9, 2012
  1. @dflemstr
  2. @dflemstr

    Add isSelected method

    dflemstr authored
  3. @dflemstr

    Fix issue where selected countries aren't displayed if the countries …

    dflemstr authored
    …also have values associated with them
  4. @dflemstr

    Fix issue where selected countries would get neutral color instead of…

    dflemstr authored
    … original color when deselected
  5. @dflemstr

    Fix manual click selection

    dflemstr authored
  6. @dflemstr
  7. @dflemstr

    Consistent style fixes

    dflemstr authored
Commits on Aug 5, 2012
  1. Merge pull request #31 from BenjaminCorey/stable

    authored
    Issue #13: Fix IE8 click handler for VML
  2. Merge pull request #29 from jbafford/feature/regionClickIsMoving

    authored
    Add isMoving flag to the map (resolve issue #19)
  3. Merge pull request #26 from der-On/stable

    authored
    Allowing a selectedColor of null that will not fill the clicked region at all.
  4. Merge pull request #25 from valinor4/stable

    authored
    Correction of an error in Europe map data
Commits on Aug 1, 2012
  1. @BenjaminCorey
Something went wrong with that request. Please try again.