Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Fixed issue when markers were plotted with wrong latitude

  • Loading branch information...
commit fe66ca201499aa00d6f2c29537f48f298df5fc81 1 parent 41bd72a
@bjornd authored
View
2  converter/converter.py
@@ -1,5 +1,5 @@
#
-# jVectorMap version 0.2.2
+# jVectorMap version 0.2.3
#
# Copyright 2011-2012, Kirill Lebedev
# Licensed under the MIT license.
View
4 jquery-jvectormap.js
@@ -1,5 +1,5 @@
/**
- * jVectorMap version 0.2.2
+ * jVectorMap version 0.2.3
*
* Copyright 2011-2012, Kirill Lebedev
* Licensed under the MIT license.
@@ -715,7 +715,7 @@
}
x = (lng - centralMeridian) / 360 * WorldMap.circumference,
- y = (180 / Math.PI * (5 / 4) * Math.log(Math.tan(Math.PI / 4 + (4 / 5) * lat * Math.PI / 360))) / 360 * WorldMap.circumference;
+ y = (180 / Math.PI * (5 / 4) * Math.log(Math.tan(Math.PI / 4 + (4 / 5) * -lat * Math.PI / 360))) / 360 * WorldMap.circumference;
inset = this.getInsetForPoint(x, y);
if (inset) {
View
8 tests/markers-usa.html
@@ -12,10 +12,10 @@
$('.map').vectorMap({
map: 'us_en',
markers: [
- [-61.18, -149.53],
- [-21.18, -157.49],
- {latLng: [-40.39, -73.56], name: 'New York City', r: 8, fill: 'yellow'},
- {latLng: [-41.52, -87.37], fill: 'red', r: 10}
+ [61.18, -149.53],
+ [21.18, -157.49],
+ {latLng: [40.39, -73.56], name: 'New York City', r: 8, fill: 'yellow'},
+ {latLng: [41.52, -87.37], fill: 'red', r: 10}
],
onMarkerLabelShow: function(event, label, index){
console.log('label-show', label, index);
View
11 tests/markers.html
@@ -13,11 +13,12 @@
map: 'world_en',
markers: [
[0, 0],
- [-48.51, 2.21],
- [33.51, 151.12],
- {latLng: [21.13, -175.2], name: 'Tonga'},
- {latLng: [-1.3, 103.8], name: 'Singapore'},
- {latLng: [-22.2, 114.1], name: 'Hong Kong'}
+ [48.51, 2.21],
+ [-33.51, 151.12],
+ [64.623877,56.25],
+ {latLng: [-21.13, -175.2], name: 'Tonga'},
+ {latLng: [1.3, 103.8], name: 'Singapore'},
+ {latLng: [22.2, 114.1], name: 'Hong Kong'}
]
});
});
Please sign in to comment.
Something went wrong with that request. Please try again.