Move feature detection to iD

This commit is contained in:
Tom MacWright
2012-11-26 15:54:31 -05:00
parent d0a8dc1f03
commit 157eb42422
2 changed files with 9 additions and 13 deletions
+9
View File
@@ -1,4 +1,13 @@
var iD = function(container) {
if (!iD.supported()) {
container.innerHTML = 'This editor is supported in Firefox, Chrome, Safari, Opera, ' +
'and Internet Explorer 9 and above. Please upgrade your browser ' +
'or use Potlatch 2 to edit the map.';
container.style.cssText = 'text-align:center;font-style:italic;';
return;
}
container = d3.select(container);
var m = container.append('div')
-13
View File
@@ -1,13 +1,5 @@
iD.Map = function(elem, connection) {
if (!iD.supported()) {
elem.innerHTML = 'This editor is supported in Firefox, Chrome, Safari, Opera, ' +
'and Internet Explorer 9 and above. Please upgrade your browser ' +
'or use Potlatch 2 to edit the map.';
elem.style.cssText = 'text-align:center;font-style:italic;';
return;
}
var map = {},
dimensions = [],
dispatch = d3.dispatch('move', 'update'),
@@ -451,11 +443,6 @@ iD.Map = function(elem, connection) {
update();
}
// Getters & setters for map state
// -------------------------------
// The map state can be expressed entirely as the combination
// of a centerpoint and a zoom level. Zoom levels are floating-point
// values, and we express lat, lon points as `{ lat, lon }` objects.
function getExtent() {
return [projection.invert([0, 0]), projection.invert(dimensions)];
}