user3495805
user3495805

Reputation: 1

svg rect image is not displayed on firefox

  1. Currently, I'm working with D3 , but whne I try to put a image svg into a rect that is not displayed on firefox. That's the code generated:

      <g transform=translate(3,2)">
      <svg viewBox="0 0 300 200">
      <rect class="background" x="0" width="58" height="80" style="fill: #80a2cb"></rect>
      <image class="img"  href="https://trac.openstreetmap.org/export/6357/subversion/applications/share/map-icons/svg/vehicle/motorbike.svg" x="0" width="58" height="80"></image>
      </svg>
       </g>
    

Thank you for your help.

Upvotes: 0

Views: 544

Answers (2)

Francis Hemsher
Francis Hemsher

Reputation: 3498

Try adding quotes to transform attribute:

<g transform="translate(3,2)">

Upvotes: 0

Michael Mullany
Michael Mullany

Reputation: 31800

That image "href" needs to be an "xlink:href".

Upvotes: 1

Related Questions