简体   繁体   English

错误:无效的值 <g> attribute transform =“scale(NaN)translate(NaN,NaN)”

[英]Error: Invalid value for <g> attribute transform=“scale(NaN) translate(NaN, NaN)”

I am trying to use jVectorMap in an application and I'm receiving this error. 我试图在应用程序中使用jVectorMap,我收到此错误。

The example shown on their website says that all you have to do is put, $('#map').vectorMap({map: 'world_mill_en'}); 他们网站上显示的例子说你需要做的就是放置$('#map').vectorMap({map: 'world_mill_en'}); on your page. 在你的页面上。

Well, I have both a div with an id of map as well as this script loaded, and I am getting this error. 好吧,我有一个带有地图ID的div以及加载的这个脚本,我收到了这个错误。 What is ? 什么是 ? I'm guessing it has something to do with SVG or some setting that isn't being set (like height or width?) 我猜它与SVG或某些未设置的设置有关(如高度或宽度?)

Here's my use of the script: 这是我对脚本的使用:

<script>
  $('#map').vectorMap({map: 'world_mill_en'});
</script>

And my div: 我的div:

<div id="map"></div>

How do I set the height/width of the div? 如何设置div的高度/宽度? Or do I set this value in vectormap, or is it something else entirely? 或者我在vectormap中设置此值,还是完全不同于其他内容?

Here is how my header scripts are organized: 以下是我的标题脚本的组织方式:

<script src="js/jquery-1.11.2/jquery-1.11.2.min.js"></script>
<script src="js/jquery.mobile-1.4.5/jquery.mobile-1.4.5.min.js"></script> 
<script src="jvectormap/jquery-jvectormap-2.0.2.min.js"></script>
<link rel="stylesheet" href="jvectormap/jquery-jvectormap-2.0.2.css" />
<script src="jvectormap/jquery-jvectormap-world-mill-en.js"></script>

use [{x: 0, y: 1}] instead of [[0,1]] 使用[{x:0,y:1}]代替[[0,1]]

usually this ends up being the cause of this error 通常这最终会导致此错误

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 d3.js:5942错误:的值无效 <g> 属性transform =“ translate(NaN,0)” - d3.js:5942 Error: Invalid value for <g> attribute transform=“translate(NaN,0)” C3js和D3js错误:的值无效 <g> 属性transform =“ translate(0,NaN)” - C3js and D3js Error: Invalid value for <g> attribute transform=“translate(0,NaN)” d3.js arc.centroid(d):错误:的值无效 <text> 属性transform =“ translate(NaN,NaN)” - d3.js arc.centroid(d) : Error: Invalid value for <text> attribute transform=“translate(NaN,NaN)” JVectorMap 错误:<g> 属性转换:预期数字,“比例(NaN)翻译(N ...” - JVectorMap Error: <g> attribute transform: Expected number, "scale(NaN) translate(N…" <g>使用交互式指南时的属性 transform=&quot;translate(NaN,NaN)&quot; - <g> attribute transform="translate(NaN,NaN)" when using Interactive Guideline D3.js 错误:<g> 属性变换:预期数字,“translate(NaN,NaN)”</g> - D3.js Error: <g> attribute transform: Expected number, “translate(NaN,NaN)” 错误:的值无效 <circle> dimple.js中的属性cx =“ NaN” - Error: Invalid value for <circle> attribute cx=“NaN” in dimple.js 错误:的值无效 <rect> 属性width =“ NaN” 6d3.v3.min.js:1错误:的值无效 <text> 属性x =“ NaN” - Error: Invalid value for <rect> attribute width=“NaN” 6d3.v3.min.js:1 Error: Invalid value for <text> attribute x=“NaN” 错误:<g>属性transform =“translate(undefined,undefined)”的值无效 - Error: Invalid value for <g> attribute transform=“translate(undefined,undefined)” 得到NaN,而不增加属性值 - getting NaN, not increment the attribute value
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM