diff --git a/CHANGELOG.md b/CHANGELOG.md index dea8308439..5a0f2a94f2 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,21 +1,32 @@ + +# [1.0.9](https://github.com/facebookincubator/RapiD/releases/tag/rapid-v1.0.9) +#### 2020-Jun-09th +#### :trumpet: Updates +This removes the FB-Maxar imagery layer. We recommend using the the Maxar Premium (Beta) layer instead. + +# [1.0.8](https://github.com/facebookincubator/RapiD/releases/tag/rapid-v1.0.8) +#### 2020-Mar-30th +#### :trumpet: Updates +This eliminates RapiD's need to contact the facebook.com domain and instead contacts the mapwith.ai domain. This should mean fewer configuration issues for folks using Firefox or similar. + # [1.0.7](https://github.com/facebookincubator/RapiD/releases/tag/rapid-v1.0.7) ##### 2020-Feb-18 #### :trumpet: Updates -This brings the RapiD code up-to-date with v2.17.2, which re-introduces Maxar Imagery. +This brings the RapiD code up-to-date with v2.17.2, which re-introduces Maxar Imagery. # [1.0.6](https://github.com/facebookincubator/RapiD/releases/tag/rapid-v1.0.6) ##### 2020-Jan-31 #### :trumpet: Updates -This brings the RapiD code up-to-date with v2.17.1. This also fixes issue #105. +This brings the RapiD code up-to-date with v2.17.1. This also fixes issue #105. # [1.0.5](https://github.com/facebookincubator/RapiD/releases/tag/rapid-v1.0.5) ##### 2019-Dec-12 #### :trumpet: Updates -This brings the RapiD code up-to-date with v2.17. This fixes issue #92. +This brings the RapiD code up-to-date with v2.17. This fixes issue #92. # [1.0.4](https://github.com/facebookincubator/RapiD/releases/tag/rapid-v1.0.4) ##### 2019-Dec-12 @@ -31,14 +42,14 @@ Merged with [iD v2.16](https://github.com/openstreetmap/iD/blob/master/CHANGELOG ##### 2019-Nov-25 #### :tada: New Features -This release includes the buildings layer from Microsoft as an enabled feature layer! Read more about it here: +This release includes the buildings layer from Microsoft as an enabled feature layer! Read more about it here: https://blogs.bing.com/maps/2019-09/microsoft-releases-18M-building-footprints-in-uganda-and-tanzania-to-enable-ai-assisted-mapping For up-to-date availability of roads and buildings, check our continually-updated GeoJSON link here: https://github.com/facebookmicrosites/Open-Mapping-At-Facebook/blob/master/data/rapid_releases.geojson #### :sparkles: Usability -The RapiD button is no longer an AI-roads toggle- instead, a dialog opens allowing you to enable Facebook's road layer, Microsoft's building layer, or nothing at all. +The RapiD button is no longer an AI-roads toggle- instead, a dialog opens allowing you to enable Facebook's road layer, Microsoft's building layer, or nothing at all. # [1.0.2](https://github.com/facebookincubator/RapiD/releases/tag/rapid-v1.0.2) ##### 2019-Oct-14 diff --git a/data/imagery.json b/data/imagery.json index ea399fe0b0..635624338f 100644 --- a/data/imagery.json +++ b/data/imagery.json @@ -13443,17 +13443,6 @@ "terms_text": "Data CC-BY 4.0 Deutsche Bahn AG", "overlay": true }, - { - "id": "Maxar-FB", - "name": "Facebook's Map With AI - Maxar Imagery", - "type": "tms", - "template": "https://mapwith.ai/maps/ml_roads?theme=ml_road_vector&collaborator=fbid&token=ASZUVdYpCkd3M6ZrzjXdQzHulqRMnxdlkeBJWEKOeTUoY_Gwm9fuEd2YObLrClgDB_xfavizBsh0oDfTWTF7Zb4C&hash=ASYM8LPNy8k1XoJiI7A&result_type=satellite_raster_tile&materialize=true&x={x}&y={y}&z={zoom}", - "zoomExtent": [11, 18], - "terms_url": "https://wiki.openstreetmap.org/wiki/DigitalGlobe", - "terms_text": "Terms", - "default": true, - "description": "Maxar Imagery used by Facebook's Map With AI." - }, { "id": "dgu-dof-2011", "name": "dgu.hr: Croatia 2011 Aerial imagery", diff --git a/modules/core/rapid_context.js b/modules/core/rapid_context.js index 732fd205e0..f8fe8ce743 100644 --- a/modules/core/rapid_context.js +++ b/modules/core/rapid_context.js @@ -1,17 +1,17 @@ import { geoExtent } from '../geo'; import toGeoJSON from '@mapbox/togeojson'; -import { dispatch as d3_dispatch } from 'd3-dispatch'; +import { dispatch as d3_dispatch } from 'd3-dispatch'; import { utilRebind } from '../util'; export function coreRapidContext() { var rapidContext = {}; - rapidContext.version = '1.0.7'; - var _isTaskBoundsRect = undefined; + rapidContext.version = '1.0.9'; + var _isTaskBoundsRect = undefined; var dispatch = d3_dispatch('task_extent_set'); function distinct (value, index, self) { - return self.indexOf(value) === index; + return self.indexOf(value) === index; } var taskExtent; @@ -21,11 +21,11 @@ export function coreRapidContext() { var lineStringCount = gj.features.reduce(function (accumulator, currentValue) { return accumulator + (currentValue.geometry.type === 'LineString' ? 1 : 0); - }, 0); + }, 0); if (gj.type === 'FeatureCollection') { var minlat, minlon, maxlat, maxlon; - // Calculate task extent. + // Calculate task extent. gj.features.forEach(function(f) { if (f.geometry.type === 'Point') { var lon = f.geometry.coordinates[0]; @@ -33,16 +33,16 @@ export function coreRapidContext() { if (minlat === undefined || lat < minlat) minlat = lat; if (minlon === undefined || lon < minlon) minlon = lon; if (maxlat === undefined || lat > maxlat) maxlat = lat; - if (maxlon === undefined || lon > maxlon) maxlon = lon; + if (maxlon === undefined || lon > maxlon) maxlon = lon; } - + if (f.geometry.type === 'LineString' && lineStringCount === 1) { var lats = f.geometry.coordinates.map(function(f) {return f[0];}); var lngs = f.geometry.coordinates.map(function(f) {return f[1];}); - var uniqueLats = lats.filter(distinct); - var uniqueLngs = lngs.filter(distinct); + var uniqueLats = lats.filter(distinct); + var uniqueLngs = lngs.filter(distinct); - var eachLatHas2Lngs = true; + var eachLatHas2Lngs = true; uniqueLats.forEach(function (lat) { var lngsForThisLat = f.geometry.coordinates // Filter the coords to the ones with this lat @@ -50,19 +50,19 @@ export function coreRapidContext() { // Make an array of lngs that associate with that lat .map(function(coord){ return coord[1]; }) // Finally, filter for uniqueness - .filter(distinct); + .filter(distinct); if (lngsForThisLat.length !== 2) { - eachLatHas2Lngs = false; + eachLatHas2Lngs = false; } - }); - // Check for exactly two unique latitudes, two unique longitudes, - //and that each latitude was associated with exactly 2 longitudes, - // - if (uniqueLats.length === 2 && uniqueLngs.length === 2 && eachLatHas2Lngs) { - _isTaskBoundsRect = true; + }); + // Check for exactly two unique latitudes, two unique longitudes, + //and that each latitude was associated with exactly 2 longitudes, + // + if (uniqueLats.length === 2 && uniqueLngs.length === 2 && eachLatHas2Lngs) { + _isTaskBoundsRect = true; } else { - _isTaskBoundsRect = false; + _isTaskBoundsRect = false; } } }); @@ -78,11 +78,11 @@ export function coreRapidContext() { rapidContext.isTaskRectangular = function() { - if (!taskExtent) { - return false; + if (!taskExtent) { + return false; } - return _isTaskBoundsRect; + return _isTaskBoundsRect; }; return utilRebind(rapidContext, dispatch, 'on'); diff --git a/modules/renderer/background.js b/modules/renderer/background.js index 239d2d236b..44a090d7ac 100644 --- a/modules/renderer/background.js +++ b/modules/renderer/background.js @@ -24,7 +24,7 @@ export function rendererBackground(context) { var _contrast = 1; var _saturation = 1; var _sharpness = 1; - var _numGridSplits = 0; // No grid by default. + var _numGridSplits = 0; // No grid by default. function background(selection) { @@ -470,7 +470,7 @@ export function rendererBackground(context) { background.findSource(requested) || best || background.findSource(context.storage('background-last-used')) || - background.findSource('Maxar-FB') || + background.findSource('Maxar-Premium') || background.findSource('Bing') || first || background.findSource('none')