-
Notifications
You must be signed in to change notification settings - Fork 79
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
I am unable to load h3-JS in my quasar project #183
Comments
Your description doesn't match your screenshot. Installing Your screenshot shows stack traces from the output of Vue's runtime core, not |
This is my package.json File which had h3-js installed: In my Vue File these are my imports I am able to see all console logs for geojson2h3 but for h3-js i am getting the attached console errors : //geojson2h3 const polygon = { const hexagons = geojson2h3.featureToH3Set(polygon, 10); const feature = geojson2h3.h3SetToFeature(hexagons); //h3-js const h3Index = h3.latLngToCell(37.3615593, -122.0553238, 7); //h3-js //h3-js I tried all the above three ways to import h3 in my vue file but getting the following errors as attached |
Oh, looking at that
That's v3.x for H3. Between v3 and v4 there was a major cleanup of function naming for better consistency (and error handling and other things we wanted to clean up). You're using the v4 naming eg My checks above assumed you were using the most recently-released version of h3-js. So you can replace |
I am able to install h3-js by using npm and then after i am not able to run any one of the following h3-js core functions:
// Convert a lat/lng point to a hexagon index at resolution 7
const h3Index = h3.latLngToCell(37.3615593, -122.0553238, 7);
// -> '87283472bffffff'
// Get the center of the hexagon
const hexCenterCoordinates = h3.cellToLatLng(h3Index);
// -> [37.35171820183272, -122.05032565263946]
// Get the vertices of the hexagon
const hexBoundary = h3.cellToBoundary(h3Index);
// -> [ [37.341099093235684, -122.04156135164334 ], ...]
I am getting the following error while i tried any of the above core functions:
The text was updated successfully, but these errors were encountered: