Ver Mensaje Individual
  #2 (permalink)  
Antiguo 29/08/2017, 08:34
Avatar de kahlito
kahlito
Colaborador
 
Fecha de Ingreso: marzo-2003
Ubicación: En el Estrecho y el mar
Mensajes: 2.936
Antigüedad: 21 años, 8 meses
Puntos: 65
Respuesta: Error en mapa svg donde se superponen textos (text tspan) con provincias (

Hola de nuevo.

Después de varios días y tiempo investigando y probando creo que una opción temporal (o quizás única) podría ser poner siempre en el código html debajo la provincia que se tapa, por ejemplo en este casi pondría Vizcaya encima de Guipúzcoa y listo. Luego si a la vez esta se superpone con otra o roza moviendo las coordenadas x e y pues la desplazo para que no se superpongan y así con eso por ahora creo que me puede servir.

Ejemplo: Pongo arriba Vizcaya, muevo el texto en x un poco mas a la izquierda x="308.99408", debajo la que no se veía y listo.

Código HTML:
Ver original
  1. <svg id="svg3609" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" version="1.1" class="map-svg">
  2. <!-- Vizcaya -->
  3.    <a class="%current30%" id="vizcaya_map" xlink:href="%judet30%">
  4.    <path id="path44" d="m339.59 25.344-0.25 0.5h-0.25-0.25-0.21875v0.21875h-0.25l-0.25 0.5h-0.21875-0.25l-0.25-0.25v0.25h-0.46875-0.25-0.46875v-0.25h-0.25-0.21875-0.25v0.25l-0.25-0.25h-0.21875-0.25-0.25-0.21875-0.5v0.25h-0.21875v0.21875 0.25h0.21875v0.25h-0.21875v-0.25l-0.25 0.25h-0.25v0.21875l-0.46875 0.25v0.25 0.21875h-0.25-0.25v0.25h-0.21875l-0.25 0.25h-0.25l-0.21875 0.21875 0.21875 0.25 0.25 0.25v0.21875h-0.25l0.5 0.25v0.25 0.21875 0.25h-0.25-0.25l-0.21875-0.25h0.21875l-0.15625-0.0625 0.15625-0.15625h-0.21875l0.21875-0.25-0.46875 0.25-0.71875-0.25-0.25-0.25-0.46875-0.46875h-0.25l0.5-0.46875-0.71875 0.46875v0.25 0.21875l-0.25 0.25-0.25-0.25h-0.46875-0.25v0.25 0.25 0.9375 0.5l-0.21875 0.25h-0.75-0.21875l-0.25 0.21875h-0.25v0.5l-0.21875-0.25v-0.25l-0.25-0.21875v-0.5l-0.71875 0.25-0.25 0.25v0.21875h-0.21875l-0.5 0.25h-0.21875l-0.25-0.25 0.25-0.21875h-0.25-0.46875v0.21875h-0.25l-0.25-0.21875-0.46875 0.21875 0.25 0.5v0.21875l-0.5 0.25-0.46875-0.25-0.25 0.25-0.25 0.25-0.21875 0.46875v0.25l-0.25-0.25h-0.25v0.25l-0.21875 0.21875h-0.25l-0.25 0.25-0.21875-0.25-0.25 0.25 0.25 0.25v0.21875l0.21875 0.71875v0.25 1.1875l0.25 0.25v0.25l0.25 0.25v0.71875h0.21875v-0.25h0.71875l0.5-0.46875h0.25l0.21875-0.25 0.25-0.5h0.25l0.21875 0.25 0.25-0.25 0.46875-0.21875 0.25-0.25 0.46875-0.46875h0.5v-0.25l0.21875 0.25v-0.25l0.5 0.46875 0.21875 0.25v0.25h0.25v0.21875l0.25-0.21875h0.21875l0.25 0.21875h0.46875l0.25-0.21875 0.25-0.25 0.25 0.25h0.21875l0.25 0.21875v0.25h0.25v0.25h0.21875l0.25 0.46875h0.25l0.46875-0.21875h0.25l0.21875 0.21875 0.5-0.46875 0.9375-0.25v-0.25l0.25-0.46875v-0.46875-0.25l0.25-0.25v0.25h0.21875 0.71875v-0.25l0.25 0.71875 0.25 0.5 0.46875 0.21875-0.21875 0.5h0.21875l0.25 0.46875v0.25l0.25 0.25h-0.25v0.21875h-0.25l-0.21875 0.5-0.25 0.46875-0.25 0.25 0.25 0.21875 0.71875 0.5v0.21875h0.25l0.46875 0.5 0.25 0.21875 0.46875 0.5v-0.25h0.25 0.46875l0.46875 0.25h0.5l0.46875 0.46875h0.96875 0.21875l0.25 0.25h0.5 0.21875v-0.25h0.25v0.25h0.25l0.46875-0.25h0.25v0.25h0.21875l0.25 0.25 0.46875-0.25 0.25-0.25 0.25 0.25 0.46875 0.25h0.25v-0.25-0.25-0.46875h-0.25l-0.25-0.5v-0.21875h-0.21875l-0.25-0.25v-0.25l0.96875-0.46875h0.21875 0.5l0.46875 0.25 0.96875-0.25h0.25l0.21875-0.25h0.25l0.25-0.21875 0.46875 0.21875 0.25-0.21875v-0.96875h0.21875l-0.21875-0.71875v-0.46875-0.25l-0.25-0.25v-0.25h0.25 0.46875v-0.21875l-0.25-0.25 0.25-0.25v-0.71875h-0.25v-0.21875h-0.21875v-0.5l0.21875-0.21875v0.21875l0.25-0.21875 0.25 0.21875h0.46875v-0.21875l0.46875-0.5 0.25-0.21875v-0.25l0.46875-0.46875v-0.25-0.25h-0.21875v-0.21875l-0.5-0.25 0.25-0.46875v-0.25l0.25-0.25h0.21875v-0.46875-0.25l-0.46875-0.25h-0.25l-0.21875-0.21875-0.25 0.21875v-0.21875l-0.25-0.5h-0.21875v-0.21875h-0.25v-0.25h-0.25-0.21875v-0.25l-0.25-0.21875h-0.25-0.21875-0.25-0.25-0.21875v-0.25h-0.25v-0.25h-0.25-0.25-0.21875-0.25-0.25v-0.21875h-0.46875-0.25-0.21875v-0.25l-0.25-0.25v-0.21875l-0.25-0.25-0.21875 0.25h-0.25-0.25-0.21875l-0.25 0.21875h-0.25v-0.21875l-0.21875-0.25h-0.25-0.25v-0.25h-0.21875l-0.25-0.21875-0.25-0.5v-0.46875h-0.21875v-0.25zm-15.125 7.6875 0.21875 0.25 0.25 0.21875v0.5l-0.25 0.21875-0.21875 0.25-0.25 0.25 0.25 0.21875-0.25 0.25 0.25 0.46875h-0.25l-0.25 0.25-0.21875-0.25h-0.25v-0.21875l0.25-0.25-0.25-0.25v-0.21875l0.25-0.5-0.24-0.22-0.25-0.25v-0.25l0.5-0.21875h0.21875 0.25l0.25-0.25zm6.9375 2.1562 0.25 0.25v0.21875h-0.25l-0.21875-0.21875 0.21875-0.25zm-0.71875 6.9688-0.21875 0.21875v0.75l-0.96875 0.46875 0.25 0.25h0.21875v-0.25l0.25 0.25h0.25v0.21875h0.21875l0.5 0.5h0.21875l0.71875 0.21875v-0.21875l0.25-0.25h0.25v-0.46875l0.21875-0.25-0.21875-0.25h-0.25-0.25l-0.46875-0.21875h-0.25l0.25-0.5v-0.25h-0.25v-0.21875h-0.46875-0.25zm1.9375 2.1562h0.21875l0.75-0.25-0.25-0.21875v0.21875h-0.25l-0.46875 0.25z" clip-path="url(#SVG_CP_1)" transform="translate(-7.9818 -8.0336)" fill=""/>  
  5.    <text id="text757" transform="scale(.99995 1)" y="26.83588" x="308.99408">
  6.     <tspan id="tspan759">Vizcaya</tspan>
  7.     </text>
  8.   </a>  
  9.        <!-- Guipúzcoa -->  
  10.        <a class="%current49%" id="guipuzcoa_map" xlink:href="%judet49%">  
  11.        <path id="path16" d="m474.23 42.243v0.24002h-0.24-0.23999-0.24v0.24001-0.24001l-0.23999 0.24001h-0.24-0.47998v0.24002l-0.24 0.24002v0.24001 0.24002 0.24002 0.24001 0.24002h-0.23999v0.24002h-0.24-0.23999v0.24001l-0.24 0.24002h-0.23999v0.24002-0.24002l-0.24 0.24002h-0.23999v-0.24002 0.24002 0.24001h-0.24 0.24-0.24v0.24002-0.24002h-0.23999v-0.24001-0.24002h-0.23999-0.24 0.24v0.24002h-0.24 0.24v0.24001h-0.24 0.24v0.24002h-0.24v0.24002-0.48004l-0.23999 0.24002h0.23999l-0.23999 0.24002v-0.24002h-0.24l-0.23999-0.24002h0.23999l-0.23999-0.24001v-0.24002l-0.24 0.24002v0.48003l0.24 0.24002-0.24 0.48003-0.23999 0.24001v0.24002l0.23999 0.48003v0.24002 0.24002 0.24001l0.24 0.24002h0.23999v0.24002 0.24001l-0.47999 0.24002v0.24002 0.24001h-0.23999-0.24v0.24002h-0.23999l0.23999 0.24002h-0.23999l-0.23999 0.24001-0.47999 0.24002h-0.24l0.24 0.24002h-0.24v0.24001h-0.23999l-0.24 0.24002v-0.24002l-0.47999 0.24002-0.23999 0.24001v0.24002h-0.23999l0.23999 0.48003v0.24002l-0.47999 0.24002v0.24001l-0.23999 0.24002v0.48003l0.23999 0.48004v0.24001h0.24l-0.24 0.48004-0.23999 0.24001h-0.24v0.24002h-0.95998-0.47998v0.72005l-0.24 0.24001v0.24002l-0.23999 0.24002h-0.24-0.23999-0.24-0.23999-0.24l-0.23999 0.24001h-0.23999-0.24v-0.24001l-0.23999-0.24002-0.24-0.24002-0.23999 0.24002-0.24-0.24002v0.24002 0.24002 0.24001h-0.23999l-0.24 0.24002h-0.23999v0.24002 1.2001l-0.24-0.24002-0.23999 0.24002v-0.24002h-0.47999-0.47999l-0.23999-0.24001v-0.48004l-0.24-0.24001v-0.24002l-0.23999 0.24002-0.24-0.24002h-0.23999l-0.47999-0.24002-0.23999-0.24001v-0.24002h-0.24-0.23999-0.24l-0.23999-0.24002h-0.24-0.23999l-0.23999-0.24001-0.47999 0.24001-0.24-0.24001h-0.23999-0.24l-0.23999 0.24001-0.24-0.24001-0.47998-0.24002h-0.24l-0.47999 0.24002-0.95998-0.48004-0.23999 0.24002 0.23999 0.48003-0.23999 0.24002v-0.24002l-0.23999-0.24001h-0.47999l-0.24-0.24002h-0.23999v-0.24002h-0.24l-0.23999-0.24001v-0.24002h0.23999l-0.23999-0.48003v-0.24002-0.24001h0.23999 0.24l0.71998-0.48004h0.24l0.23999-0.24001v-0.24002l0.23999-0.24002 0.24-0.24001v-0.24002l-0.24-0.48003h-0.23999v-0.48004h-0.23999l0.23999-0.24001v-0.24002-0.24001h0.23999l0.24-0.24002 0.47999 0.24002 0.23999-0.24002v-0.96007h0.24l-0.24-0.72005v-0.48003-0.24002l-0.23999-0.24001v-0.24002h0.23999 0.47999v-0.24002l-0.23999-0.24001 0.23999-0.24002v-0.72005h-0.23999v-0.24001h-0.24v-0.48004l0.24-0.24001v0.24001l0.23999-0.24001 0.24 0.24001h0.47998v-0.24001l0.47999-0.48004 0.24-0.24001v-0.24002l0.47999-0.48003v-0.24002-0.24002h-0.24v-0.24001l-0.47999-0.24002 0.24-0.48003v-0.24002l0.23999-0.24001h0.24v-0.48004h0.23999 0.24l0.71998 0.48004h-0.24 0.24 0.23999l0.24 0.24001h0.23999v0.24002h0.24v-0.24002l0.71998 0.24002h0.23999 0.71999 0.23999 0.24 0.23999v-0.24002 0.24002l0.24-0.24002h0.23999 0.23999v-0.24001h0.47999 0.24l0.23999 0.24001 0.24-0.24001v0.24001l0.23999 0.24002v0.24001l0.24-0.24001 0.23999 0.24001v0.24002l0.71998-0.24002v-0.24001l0.24 0.24001h0.23999 0.24v-0.24001h0.23999l0.24-0.24002 0.71998-0.24001h0.47999v-0.24002h0.71998v-0.24002h0.24 0.47999 0.23999v-0.24001h0.23999v0.24001l0.24 0.24002 0.23999-0.24002-0.23999-0.24001h0.23999 0.24 0.23999v-0.48004h0.24 0.47999v0.24002l0.23999-0.24002h0.23999v0.24002h0.24v-0.24002h-0.24 0.47999l0.24-0.24001 0.47999-0.24002h0.23999l0.24-0.72005 0.23999-0.24002h0.23999v-0.24001h0.24 0.23999v-0.24002h0.47999l0.24-0.24002h0.23999l0.47999-0.24001 0.24 0.24001h-0.24l-0.23999 0.24002v0.24002l0.23999 0.24001v-0.24001 0.24001 0.24002l0.24 0.24002-0.24 0.24001h0.24l0.23999 0.24002 0.23999 0.24002 0.24-0.24002 0.23999 0.24002v0.24001l0.47999 0.24002v0.24002 0.24001 0.24002l0.24 0.48003m-12.48 0.48003" clip-path="url(#SVG_CP_1)" transform="translate(-112.39 -18.688)" fill=""/>
  12.       <text id="text769" transform="scale(.99995 1)" y="33.925827" x="327.77164">
  13.        <tspan id="tspan771">Guipúzcoa</tspan>
  14.        </text>    
  15.     </a>
  16.     </svg>

No se si habrá otra solución, por ahora creo que esta opción me sirve, aún así lo dejo abierto por si hay alguna otra manera de hacerlo.

Saludos.