Browse Source

测试底图使用SVG

caner 1 year ago
parent
commit
4107fea135
3 changed files with 10 additions and 1 deletions
  1. BIN
      .DS_Store
  2. 9 0
      index/4.svg
  3. 1 1
      index/index.js

BIN
.DS_Store


+ 9 - 0
index/4.svg

@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<svg width="349.007135px" height="274.00004px" viewBox="0 0 349.007135 274.00004" version="1.1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
+    <title>编组 6</title>
+    <g id="页面-1" stroke="none" stroke-width="1" fill="none" fill-rule="evenodd">
+        <g id="编组-6" transform="translate(-0.012468, 0.000040)" fill="#FFFFFF" stroke="#979797">
+            <path d="M174.087591,0.514560141 C221.082581,-0.0605323943 258.036942,16.4651639 285.471873,39.3811671 C324.097037,71.644211 343.867653,116.568208 346.20662,144.24652 C350.19951,191.496617 349.953227,225.979727 337.927395,239.136244 C331.547559,246.11592 292.534012,273.500015 156.081032,273.500015 C124.046067,273.249295 88.3649706,267.889441 59.9639811,260.374988 C31.6787425,252.891161 10.4895126,243.339368 7.76631374,234.485863 C0.979316969,215.637975 -3.35222841,169.181427 5.40075043,132.103662 C11.4231177,109.216448 30.4968016,66.3255379 69.7184967,35.7271113 C95.2877064,15.7795392 129.422591,1.06113985 174.087591,0.514560141 Z" id="三台阶"></path>
+        </g>
+    </g>
+</svg>

+ 1 - 1
index/index.js

@@ -30,7 +30,7 @@ Page({
     const width = res[0].width
     const height = res[0].height
     const canvas = res[0].node
-    this.drawCanvas._init({ width, height, canvas, baseMapUrl:'./3.png'})
+    this.drawCanvas._init({ width, height, canvas, baseMapUrl:'./4.svg'})
   },
 
   start() {