mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-20 23:44:47 +02:00
Move feature detection to iD
This commit is contained in:
@@ -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')
|
||||
|
||||
@@ -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)];
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user