Business
Jobs
  • About Us
  • Solutions
    • Job Postings
      Post your job and receive qualified candidates in 48h.
    • Candidate Assessments
      500+ technical and psychological tests, plus anti-fraud.
    • Headhunting
      Tailor-made executive search from start to finish.
    • Payroll + EOR
      Payroll dispersal and EOR across 15+ LATAM countries.
  • Pricing
  • Jobs

0

215
Views
Hot to add text to svg

I use vue-svg-map and usa map.

I need to show state code (path.id) on my svg map. How can i make this?

<radio-svg-map
 v-model="selectedLocation"
 :map="usa"
 :location-class="getLocationClass"
  @change="selectdLocation"
  @mouseover="pointLocation"
  @mouseout="unpointLocation"
  @mousemove="moveOnLocation"
 />
 
  import usa from "../static/usa";
  
<svg
 xmlns="http://www.w3.org/2000/svg"
 viewBox="192 9 1028 746"
 aria-label="Map of USA"
>
    <path
     id="AK"
     name="Alaska"
     d="M456.18,..."
    />
...
</svg>

about 4 years ago · Santiago Trujillo
1 answers
Answer question

0

I assume you can use <text> SVG tag.

If you using Vue.JS it will be something like:

<text>{{ path.id }}</text>

More detailed about <text> tag you can read here:

https://developer.mozilla.org/en-US/docs/Web/SVG/Element/text

P.S. Your code snippet seems a little bit broken.

about 4 years ago · Santiago Trujillo Report
Answer question
Find remote jobs

Discover the new way to find a job!

Top jobs
Top job categories
Business
Post vacancy Pricing Sales
Legal
Terms and conditions Privacy policy
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Show me some job opportunities
There's an error!