hey iris, have u tried debugging the json output? maybe try console.logging the raw json before parsing it. Also, are u sure the php array structure matches what the hexmap library expects? sometimes theres subtle differences that can trip things up. lemme know if u need more help troubleshooting!
hey iris72, have u tried using the @json blade directive instead? like this:
const hexes = @json($map);
it’s a bit cleaner and might solve ur issue. also, double-check that $map is actually set in ur controller before passing it to the view. hope this helps!
I encountered a similar issue when working with JSON data in Laravel and Blade. One solution that worked for me was using the json_encode() function with the JSON_NUMERIC_CHECK flag. This ensures that numeric strings are converted to numbers, which might be causing the NaN errors you’re seeing.