Comments (13)
Looking into your code I found this inside index.js:
import AMapCoordSys from "./GMapCoordSys";
import "./GMapModel";
import "./GMapView";
echarts.registerCoordinateSystem("amap", AMapCoordSys);
Maybe it's a problem because GMapCoordSys exports "GMapCoordSys"
Thank you.
from echarts-extension-gmap.
@Nevyn75 Thanks for your review! This is really helpful. It should be gmap
but not amap
. Fixed in 28334e9 & 4d75251
from echarts-extension-gmap.
And for the error
"TypeError: Cannot read property 'dataToPoint' of null"
how does your test case look like?
from echarts-extension-gmap.
Hi.
I already have echarts as dependency in my project.
I discover that your call to:
echarts.registerCoordinateSystem('gmap', GMapCoordSys)
was received by your echarts instance inside your dependencies (in your directory node_modules) and not in mine, so at the end 'gmap' coordinateSystem was not registered and that's why I had a null object.
To make it working I had to copy your js files into my project directly and now it seems ok.
If you could fix this, I would of course prefer to use your package as a module :-)
Thank you
from echarts-extension-gmap.
Hi, @Nevyn75
I've fixed this issue and released the new version 1.2.1 on NPM, please feel free to help to test it.
Thank you very much.
from echarts-extension-gmap.
Could you please provide working example with series type: 'line' ? Thank you.
from echarts-extension-gmap.
@helgasoft I'm sorry but only the series that supports the geo
coordinate can work in this extension for Google Maps.
from echarts-extension-gmap.
oops, wrong type - it's 'lines', not 'line'. This is supported in 'geo' (paste in Editor) :
option = {
"yAxis": { }, "xAxis": { "type": "category" },
"title": {
"text": "DFW",
"top": 30
},
"backgroundColor": "#191919",
"geo": {
"map": "world",
"roam": true,
"center": [-97.0372, 32.8959],
"zoom": 4
},
"series": [
{
"type": "scatter",
"coordinateSystem": "geo",
"data": [
{
"value": ["-97.0372", "32.89595", "-106.60919", "35.04022", "AA", "DFW", "ABQ", "444"]
},
{
"value": ["-97.0372", "32.89595", " -72.68323", "41.93887", "AA", "DFW", "BDL", "162"]
},
{
"value": ["-97.0372", "32.89595", " -86.75355", "33.56294", "AA", "DFW", "BHM", "168"]
}
],
"symbolSize": 8
},
{
"type": "lines",
"coordinateSystem": "geo",
"data": [
{
"coords": [
["-97.0372", "32.89595"],
["-106.60919", "35.04022"]
]
},
{
"coords": [
["-97.0372", "32.89595"],
[" -72.68323", "41.93887"]
]
},
{
"coords": [
["-97.0372", "32.89595"],
[" -86.75355", "33.56294"]
]
}
],
"lineStyle": {
"curveness": 0.3,
"width": 2,
"color": "red"
}
}
]
};
Any similar example for this library ?
from echarts-extension-gmap.
@helgasoft Here is the demo: https://codepen.io/plainheart/pen/VwpqOYV
from echarts-extension-gmap.
@plainheart, thank you!
My mistake was to use example from the Readme.md where each point has 3 elements [lng,lat,value]. When using type:'lines' however, parameter coords accepts only two [lng,lat], otherwise lines are not drawn.
from echarts-extension-gmap.
@plainheart 请问一下,目前这个插件貌似不支持 polyline = true, 即多线段绘制属性。是吗
from echarts-extension-gmap.
@neoayi 应该是可以的。这里有个示例:https://codepen.io/plainheart/pen/LYybaxW
from echarts-extension-gmap.
from echarts-extension-gmap.
Related Issues (12)
- if i import or require this package how to set gmap key HOT 1
- Size gmap HOT 8
- Is it possible to combine GeoJSON with this extension ?
- The echart/zrender canvas is not resized when Google Map goes fullscreen. HOT 3
- Echarts not reflow
- can not support graph? HOT 2
- Can this extension implement polygons and polylines on Google Map? HOT 9
- TypeError: echarts.init is not a function HOT 3
- brush selection HOT 1
- Angular 2+ support? HOT 1
- Is it workds with dataset? Could you show an example? HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from echarts-extension-gmap.