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

149
Views
valor de php EOT que causa un error de mapa de javascript

tratando de representar mapSvg a través del valor de php.

sin embargo, tiene un problema cuando mapSvg intenta leer el valor de la variable php ...

si introduzco el valor de php en la fuente_elegida, entonces hago esto

 jQuery('#map-'+chosen_source).mapSvg(

entonces esta línea anterior activará el error mapsvg getComputedStyle.

si codifico directamente jQuery('#map-newyork').mapSvg( entonces no hay error

si declaro var chosen_source = 'newyork';
entonces no hay error.

 mapsvg.min.js:1 Uncaught TypeError: Failed to execute 'getComputedStyle' on 'Window': parameter 1 is not of type 'Element'. at new MapSVG.ResizeSensor (mapsvg.min.js:1:746) at Object.setResponsive (mapsvg.min.js:3:2667) at Object.setSize (mapsvg.min.js:3:2119) at Object.<anonymous> (mapsvg.min.js:4:25190) at c (jquery-3.6.0.min.js:2:28327) at Object.fireWith [as resolveWith] (jquery-3.6.0.min.js:2:29072) at l (jquery-3.6.0.min.js:2:79901) <?php $state = "newyork"; $printout = <<<EOT var view_width = jQuery("#content").width(); var chosen_source = `{$state}`; var w = 1000; var h = 500; var vB = [map_source.get(chosen_source).get('vb_L')]; jQuery('#map-'+chosen_source).mapSvg( {width: w, height: h, source: "/map/"+ map_source.get(chosen_source).get('source') }); EOT; echo $printout; ?>

alguien tiene solucion a esto?

about 4 years ago · Juan Pablo Isaza
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!