mirror of
https://github.com/FoggedLens/iD.git
synced 2026-05-31 12:19:31 +02:00
+9
-7
@@ -1,3 +1,5 @@
|
||||
import _values from 'lodash-es/values';
|
||||
|
||||
export { wikipedia as dataWikipedia } from 'wmf-sitematrix';
|
||||
export { default as dataSuggestions } from 'name-suggestion-index/name-suggestions.json';
|
||||
|
||||
@@ -24,31 +26,31 @@ import { categories } from './presets/categories.json';
|
||||
import { fields } from './presets/fields.json';
|
||||
|
||||
import { geoArea as d3_geoArea } from 'd3-geo';
|
||||
import _values from 'lodash-es/values';
|
||||
import whichPolygon from 'which-polygon';
|
||||
|
||||
var features = _values(ociFeatures).map(function(feature) {
|
||||
// workaround for which-polygon
|
||||
// only supports `properties`, not `id`
|
||||
|
||||
// index the osm-community-index
|
||||
var ociFeatureCollection = _values(ociFeatures).map(function(feature) {
|
||||
// workaround for which-polygon: only supports `properties`, not `id`
|
||||
// https://github.com/mapbox/which-polygon/pull/6
|
||||
feature.properties = {
|
||||
id: feature.id,
|
||||
area: d3_geoArea(feature) // also precompute areas
|
||||
};
|
||||
|
||||
return feature;
|
||||
});
|
||||
|
||||
|
||||
export var data = {
|
||||
community: {
|
||||
features: ociFeatures,
|
||||
resources: ociResources,
|
||||
query: whichPolygon({
|
||||
type: 'FeatureCollection',
|
||||
features: features
|
||||
features: ociFeatureCollection
|
||||
})
|
||||
},
|
||||
imagery: dataImagery,
|
||||
imagery: dataImagery, //legacy
|
||||
presets: {
|
||||
presets: presets,
|
||||
defaults: defaults,
|
||||
|
||||
Reference in New Issue
Block a user