Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@evergis/sp-api

Package Overview
Dependencies
Maintainers
5
Versions
26
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@evergis/sp-api - npm Package Compare versions

Comparing version 0.4.18 to 0.4.19

2

dist/everGis.js

@@ -66,3 +66,3 @@ import { SpatialProcessor } from "./SpatialProcessor";

ServiceSnappingProvider: ServiceSnappingProvider,
version: "0.4.18",
version: "0.4.19",
releaseDate: "22.02.2019"

@@ -69,0 +69,0 @@ };

@@ -34,2 +34,8 @@ import { PointFeature } from "@evergis/sgis/features/PointFeature";

};
function normalizeFeatureAttribute(attributes) {
return attributes && attributes.reduce((acc, { Key, Value }) => {
acc[Key] = Value;
return acc;
}, {});
}
export const deserializeFeature = function (obj, crs) {

@@ -39,4 +45,12 @@ let Constructor = geometryTypeMap[obj.geometryType];

error('Unknown geometry type');
return new Constructor(obj.geometry, { crs: crs, attributes: obj.attributes, sourceName: obj.sourceName, id: obj.id, symbol: defaultSymbols[obj.geometryType] });
const feature = new Constructor(obj.geometry, {
crs,
symbol: defaultSymbols[obj.geometryType]
});
// feature constructor not set other attributes
feature.attributes = normalizeFeatureAttribute(obj.attributes);
feature.sourceName = obj.sourceName;
feature.id = obj.id;
return feature;
};
//# sourceMappingURL=JsonSerializer.js.map
{
"name": "@evergis/sp-api",
"version": "0.4.18",
"version": "0.4.19",
"description": "",

@@ -5,0 +5,0 @@ "main": "dist/compilation/everGis.js",

@@ -67,3 +67,3 @@ import {SpatialProcessor} from "./SpatialProcessor";

ServiceSnappingProvider: ServiceSnappingProvider,
version: "0.4.18",
version: "0.4.19",
releaseDate: "22.02.2019"

@@ -70,0 +70,0 @@ };

@@ -34,2 +34,9 @@ import {PointFeature} from "@evergis/sgis/features/PointFeature";

function normalizeFeatureAttribute(attributes: { Key: string, Value: any }[]) {
return attributes && attributes.reduce((acc, { Key, Value }) => {
acc[Key] = Value;
return acc;
}, {})
}
export const deserializeFeature = function(obj, crs) {

@@ -39,3 +46,12 @@ let Constructor = geometryTypeMap[obj.geometryType];

return new Constructor(obj.geometry, { crs: crs, attributes: obj.attributes, sourceName: obj.sourceName, id: obj.id, symbol: defaultSymbols[obj.geometryType] });
const feature = new Constructor(obj.geometry, {
crs,
symbol: defaultSymbols[obj.geometryType]
});
// feature constructor not set other attributes
feature.attributes = normalizeFeatureAttribute(obj.attributes);
feature.sourceName = obj.sourceName;
feature.id = obj.id;
return feature;
};

Sorry, the diff of this file is too big to display

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc