bower_components/jvectormap/lib/world-map.js
function(lat, lng) {
    var point,
        proj = jvm.WorldMap.maps[this.params.map].projection,
        centralMeridian = proj.centralMeridian,
        width = this.width - this.baseTransX * 2 * this.baseScale,
        height = this.height - this.baseTransY * 2 * this.baseScale,
        inset,
        bbox,
        scaleFactor = this.scale / this.baseScale;

    if (lng < (-180 + centralMeridian)) {
      lng += 360;
    }

    point = jvm.Proj[proj.type](lat, lng, centralMeridian);

    inset = this.getInsetForPoint(point.x, point.y);
    if (inset) {
      bbox = inset.bbox;

      point.x = (point.x - bbox[0].x) / (bbox[1].x - bbox[0].x) * inset.width * this.scale;
      point.y = (point.y - bbox[0].y) / (bbox[1].y - bbox[0].y) * inset.height * this.scale;

      return {
        x: point.x + this.transX*this.scale + inset.left*this.scale,
        y: point.y + this.transY*this.scale + inset.top*this.scale
      };
     } else {
       return false;
     }
  }
function(lat, lng) {
    var point,
        proj = jvm.WorldMap.maps[this.params.map].projection,
        centralMeridian = proj.centralMeridian,
        width = this.width - this.baseTransX * 2 * this.baseScale,
        height = this.height - this.baseTransY * 2 * this.baseScale,
        inset,
        bbox,
        scaleFactor = this.scale / this.baseScale;

    if (lng < (-180 + centralMeridian)) {
      lng += 360;
    }

    point = jvm.Proj[proj.type](lat, lng, centralMeridian);

    inset = this.getInsetForPoint(point.x, point.y);
    if (inset) {
      bbox = inset.bbox;

      point.x = (point.x - bbox[0].x) / (bbox[1].x - bbox[0].x) * inset.width * this.scale;
      point.y = (point.y - bbox[0].y) / (bbox[1].y - bbox[0].y) * inset.height * this.scale;

      return {
        x: point.x + this.transX*this.scale + inset.left*this.scale,
        y: point.y + this.transY*this.scale + inset.top*this.scale
      };
     } else {
       return false;
     }
  }
function ( lat , lng ) { var point , proj = jvm . WorldMap . maps [ this . params . map ] . projection , centralMeridian = proj . centralMeridian , width = this . width - this . baseTransX * 2 * this . baseScale , height = this . height - this . baseTransY * 2 * this . baseScale , inset , bbox , scaleFactor = this . scale / this . baseScale ; if ( lng < ( - 180 + centralMeridian ) ) { lng += 360 ; } point = jvm . Proj [ proj . type ] ( lat , lng , centralMeridian ) ; inset = this . getInsetForPoint ( point . x , point . y ) ; if ( inset ) { bbox = inset . bbox ; point . x = ( point . x - bbox [ 0 ] . x ) / ( bbox [ 1 ] . x - bbox [ 0 ] . x ) * inset . width * this . scale ; point . y = ( point . y - bbox [ 0 ] . y ) / ( bbox [ 1 ] . y - bbox [ 0 ] . y ) * inset . height * this . scale ; return { x : point . x + this . transX * this . scale + inset . left * this . scale , y : point . y + this . transY * this . scale + inset . top * this . scale } ; } else { return false ; } }
Converts coordinates expressed as latitude and longitude to the coordinates in pixels on the map.
@param {Number} lat Latitide of point in degrees.
@param {Number} lng Longitude of point in degrees.
Converts coordinates expressed as latitude and longitude to the coordinates in pixels on the map .