forked from MapComplete/MapComplete
Fix: tests
This commit is contained in:
parent
09a3e7fba1
commit
1d543563d7
1 changed files with 8 additions and 3 deletions
|
@ -60,7 +60,10 @@ export default class DownloadHelper {
|
||||||
/**
|
/**
|
||||||
* Converts a geojson to an SVG
|
* Converts a geojson to an SVG
|
||||||
*
|
*
|
||||||
* const feature = {
|
*
|
||||||
|
* import StaticFeatureSource from "../../Logic/FeatureSource/Sources/StaticFeatureSource";
|
||||||
|
*
|
||||||
|
* const feature: Feature = {
|
||||||
* "type": "Feature",
|
* "type": "Feature",
|
||||||
* "properties": {},
|
* "properties": {},
|
||||||
* "geometry": {
|
* "geometry": {
|
||||||
|
@ -71,8 +74,10 @@ export default class DownloadHelper {
|
||||||
* ]
|
* ]
|
||||||
* }
|
* }
|
||||||
* }
|
* }
|
||||||
* const perLayer = new Map<string, any[]>([["testlayer", [feature]]])
|
* const features = new StaticFeatureSource([feature])
|
||||||
* DownloadHelper.asSvg(perLayer).replace(/\n/g, "") // => `<svg width="1000px" height="1000px" viewBox="0 0 1000 1000"> <g id="testlayer" inkscape:groupmode="layer" inkscape:label="testlayer"> <path d="M0,27.77777777777778 1000,472.22222222222223" style="fill:none;stroke-width:1" stroke="#ff0000"/> </g></svg>`
|
* const perLayer = new Map<string, any>()
|
||||||
|
* perLayer.set("testlayer", features)
|
||||||
|
* new DownloadHelper(<any> {perLayer}).asSvg().replace(/\n/g, "") // => `<svg width="1000px" height="1000px" viewBox="0 0 1000 1000"> <g id="testlayer" inkscape:groupmode="layer" inkscape:label="testlayer"> <path d="M0,27.77777777777778 1000,472.22222222222223" style="fill:none;stroke-width:1" stroke="#ff0000"/> </g></svg>`
|
||||||
*/
|
*/
|
||||||
public asSvg(
|
public asSvg(
|
||||||
options?: {
|
options?: {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue