Switched to a custom country code service

This commit is contained in:
Christian Schwarz
2014-06-05 20:30:12 +02:00
parent 5a51a6c8c2
commit 49eae8e389
7 changed files with 48 additions and 19 deletions
+1
View File
@@ -38,6 +38,7 @@
<script src='../js/id/id.js'></script>
<script src='../js/id/util.js'></script>
<script src='../js/id/services/countrycode.js'></script>
<script src='../js/id/services/taginfo.js'></script>
<script src='../js/id/services/wikipedia.js'></script>
+2 -2
View File
@@ -241,12 +241,12 @@ describe('iD.geo', function() {
expect(iD.geo.pointInFeature(point, feature)).to.be.true;
});
it('point should be in a polygon feature with bounds', function() {
var feature = { geometry: { type: 'Polygon', coordinates: [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]] }, properties: { bounds: [[0, 0], [1, 1]] } };
var feature = { geometry: { type: 'Polygon', coordinates: [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]] }, bounds: [[0, 0], [1, 1]] };
var point = [0.5, 0.5];
expect(iD.geo.pointInFeature(point, feature)).to.be.true;
});
it('point should not be in a polygon feature with bounds', function() {
var feature = { geometry: { type: 'Polygon', coordinates: [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]] }, properties: { bounds: [[0, 0], [1, 1]] } };
var feature = { geometry: { type: 'Polygon', coordinates: [[[0, 0], [0, 1], [1, 1], [1, 0], [0, 0]]] }, bounds: [[0, 0], [1, 1]] };
var point = [0.5, 1.5];
expect(iD.geo.pointInFeature(point, feature)).to.be.false;
});