bower_components/jvectormap/lib/world-map.js
function(x, y) {
    var proj = jvm.WorldMap.maps[this.params.map].projection,
        centralMeridian = proj.centralMeridian,
        insets = jvm.WorldMap.maps[this.params.map].insets,
        i,
        inset,
        bbox,
        nx,
        ny;

    for (i = 0; i < insets.length; i++) {
      inset = insets[i];
      bbox = inset.bbox;

      nx = x - (this.transX*this.scale + inset.left*this.scale);
      ny = y - (this.transY*this.scale + inset.top*this.scale);

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

      if (nx > bbox[0].x && nx < bbox[1].x && ny > bbox[0].y && ny < bbox[1].y) {
        return jvm.Proj[proj.type + '_inv'](nx, -ny, centralMeridian);
      }
    }

    return false;
  }
function(x, y) {
    var proj = jvm.WorldMap.maps[this.params.map].projection,
        centralMeridian = proj.centralMeridian,
        insets = jvm.WorldMap.maps[this.params.map].insets,
        i,
        inset,
        bbox,
        nx,
        ny;

    for (i = 0; i < insets.length; i++) {
      inset = insets[i];
      bbox = inset.bbox;

      nx = x - (this.transX*this.scale + inset.left*this.scale);
      ny = y - (this.transY*this.scale + inset.top*this.scale);

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

      if (nx > bbox[0].x && nx < bbox[1].x && ny > bbox[0].y && ny < bbox[1].y) {
        return jvm.Proj[proj.type + '_inv'](nx, -ny, centralMeridian);
      }
    }

    return false;
  }
function ( x , y ) { var proj = jvm . WorldMap . maps [ this . params . map ] . projection , centralMeridian = proj . centralMeridian , insets = jvm . WorldMap . maps [ this . params . map ] . insets , i , inset , bbox , nx , ny ; for ( i = 0 ; i < insets . length ; i ++ ) { inset = insets [ i ] ; bbox = inset . bbox ; nx = x - ( this . transX * this . scale + inset . left * this . scale ) ; ny = y - ( this . transY * this . scale + inset . top * this . scale ) ; nx = ( nx / ( inset . width * this . scale ) ) * ( bbox [ 1 ] . x - bbox [ 0 ] . x ) + bbox [ 0 ] . x ; ny = ( ny / ( inset . height * this . scale ) ) * ( bbox [ 1 ] . y - bbox [ 0 ] . y ) + bbox [ 0 ] . y ; if ( nx > bbox [ 0 ] . x && nx < bbox [ 1 ] . x && ny > bbox [ 0 ] . y && ny < bbox [ 1 ] . y ) { return jvm . Proj [ proj . type + '_inv' ] ( nx , - ny , centralMeridian ) ; } } return false ; }
Converts cartesian coordinates into coordinates expressed as latitude and longitude.
@param {Number} x X-axis of point on map in pixels.
@param {Number} y Y-axis of point on map in pixels.
Converts cartesian coordinates into coordinates expressed as latitude and longitude .