-
Notifications
You must be signed in to change notification settings - Fork 8
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GeoArrowScatterplotLayer throws 'c.vector is undefined' #126
Comments
As a general note, I'd suggest testing with the PathLayer before testing with the TripsLayer. The TripsLayer is more complex. This is probably due to the Arrow name not correctly getting found. We found recently that the name of arrow-js on the page has to be |
Thanks for the clarification. I saw that PR but assumed it was already released. I'll wait until then.
This example is using ScatterplotLayer. Am I missing something? |
Yeah must be an issue with the source maps... |
I published @geoarrow/[email protected] with the latest main |
I'm not a JS expert, and personally I always use React with a bundler. Based on the previous issue in #109, it seemed like people were able to get something working directly from a CDN. I don't have a lot of spare time right now, so I'm not able to try and dig in and debug this. |
Maybe @joemarlo can help write CI/CD pipelines for that? |
@jaredlander did you ever get this working? If so, how? |
I didn't think we looked at it yet, but I'll remind my folks to take a look. |
Thanks! |
This does look similar to #109. I don't think we ever got it working straight from a CDN. We cloned the branches, ran
Not a clue how to get this on a CDN. Do you have to submit to CDNs or do they just scan and pull the repos' It looks like the fix for |
I merged the geoarrow-js pr. If you need me to create a patch release I can |
Thanks, @kylebarron. I think a release is necessary. Do you submit it to npm? I did a little poking around and the CDNs apparently just pull the latest version from there. |
I published 0.3.1 https://github.com/geoarrow/geoarrow-js/releases/tag/v0.3.1 |
Thanks everyone! When using the latest versions, we get rid of the JS errors, but we get a webgl warning (this is in Firefox):
<!DOCTYPE html>
<head>
<meta charset='UTF-8' />
<title>GeoArrowScatterplotLayer issue</title>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/Arrow.es2015.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/dist.dev.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@geoarrow/[email protected]/dist/geoarrow.umd.min.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@geoarrow/[email protected]/dist/dist.umd.min.js"></script>
<style>
map {
position: absolute;
top: 0;
left: 0;
width: 100vw;
height: 100vh;
}
body {
font-family: Helvetica, Arial, sans-serif;
width: 100vw;
height: 100vh;
margin: 0;
}
#holder {
border-color: red;
border-width: 1px;
border-style: solid;
position: relative;
height: 600px;
width: 95%;
}
</style>
</head>
<body>
<div id="holder"></div>
<script type="module">
const geoarrowLayers = window['@geoarrow/deck']['gl-layers'];
const GEOARROW_POINT_DATA = "https://geoarrow-test.s3.eu-central-1.amazonaws.com/test1_layer.arrow";
const arrow_table = await Arrow.tableFromIPC(fetch(GEOARROW_POINT_DATA));
const INITIAL_VIEW_STATE = {
latitude: 40.72875,
longitude: 14.00005,
zoom: 10,
bearing: 0,
pitch: 0
};
const mainMap = new deck.DeckGL({
initialViewState: INITIAL_VIEW_STATE,
id: 'mainMap',
controller: true,
container: "holder",
layers: [
new geoarrowLayers.GeoArrowScatterplotLayer({
id: 'scatter',
data: arrow_table,
pickable: true,
getFillColor: [80, 0, 200],
getPosition: arrow_table.getChild('geometry'),
getRadius: 30,
radiusMinPixels: 3
})
]
});
</script>
</body>
</html> |
That could be a bug in deck.gl v9 |
@felixpalmer this is the issue we just talked about in the morning session of sdsl2024. Maybe you can have a look at what the problem could be with the above example? |
It's best if you don't use the minified scripts, so go with: <script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/dist.dev.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@geoarrow/[email protected]/dist/geoarrow.umd.js"></script>
<script src="https://cdn.jsdelivr.net/npm/@geoarrow/[email protected]/dist/dist.umd.js"></script> With this in place I tried to debug, but something seems off with your Arrow file, I tried loading it in https://arrowviewer.pages.dev/ and it also gives an error:
Could you try with another arrow file? At any rate the issue seems to be with the Arrow handling rather than anything related to the v9 migration |
Yeah this is a "separated" GeoArrow column, which deck.gl-layers does not yet support. See #3 ![]() |
Great success! With the help of @paleolimbot I was able to write interleaved coordinates and the example now works: Thanks for all your patience, everyone! |
As alluded to on Mastodon, I am still having issues with getting
GeoArrowScatterplotLayer
to work. A reproducible example is below. This seems a very similar issue to what @jaredlander reported here, in fact, I've modified his example in the reprex below. This uses some.arrow
data hosted on a CORS enabled public bucket on AWS S3.This is the error in the console
Any ideas as to what might cause this?
The text was updated successfully, but these errors were encountered: