LarsWiegers / laravel-maps

Your laravel maps libary.
https://github.com/LarsWiegers/laravel-maps
MIT License
254 stars 35 forks source link

Missing Tiles #33

Closed synecdocheNORTH closed 2 years ago

synecdocheNORTH commented 2 years ago

Hi,

Does anyone have any ideas why the tiles are not fully loading? See screenshot below.

I'm using Bootstrap, but I cannot see where any conflicts are coming from. I've also added my Mapbox API key to my .env file. Using Google works OK but I need multiple instances of the map so I need to use the Leaflet option.

Screenshot 2022-08-10 at 13 59 02
LarsWiegers commented 2 years ago

Hi! thx for creating the issue.

Without code + console screenshots it is going to be hard to diagnose what is going on. So pls share your code + what is happening in the console.

synecdocheNORTH commented 2 years ago

Hi,

Thanks for the response. I am sure it is an issue my side for sure! It's excellent other than this issue I'm having

There's no related console errors. Additionally, I'm using very little custom CSS, when I remove the issue is the same. It feels like the right hand side of the map canvas isn't loading. I can pull what appears to the other side if that makes sense.

Screenshot 2022-08-10 at 16 09 27 Screenshot 2022-08-10 at 16 05 37

@foreach ($entry->tasks as $task) <x-maps-leaflet id="marker{{ $task->id }}" class="h-100 w-100" :centerPoint="[ 'lat' => $task->address_latitude, 'long' => $task->address_longitude, ]" :markers="[ [ 'lat' => $task->address_latitude, 'long' => $task->address_longitude, ], ]" :zoomLevel="15"> </x-maps-leaflet> @endforeach

LarsWiegers commented 2 years ago

We split the marker array up to create an array of markers, can you remove the last , from this: $task->address_longitude, ], ]" and try again?

Can you also share a screenshot of the network tab?

Also if you want to use mapbox you need to add tileHost="mapbox" to the component.

synecdocheNORTH commented 2 years ago

Thanks,

I have set the tileHost and remove the comma. Same result unfortunately.

Screenshot 2022-08-10 at 17 00 09 Screenshot 2022-08-10 at 16 59 26

Network tab:

Screenshot 2022-08-10 at 17 00 34
synecdocheNORTH commented 2 years ago

Hi,

Actually the network tab has come up with the following:

Screenshot 2022-08-10 at 17 31 28
synecdocheNORTH commented 2 years ago
Screenshot 2022-08-10 at 18 08 03
LarsWiegers commented 2 years ago

very weird, almost seems like it would be a bug with leaflet then. going to need to think about this for a bit.

synecdocheNORTH commented 2 years ago

Ok, thank you for your efforts thus far. They're appreciated.

ryangurn commented 2 years ago

I am having a similar issue and it appears that it could be caused by the lack of dimensions being provided to the tile layer. I am not entirely sure how to address this but ill continue doing some research.

LarsWiegers commented 2 years ago

@synecdocheNORTH can you setup a repo that is able to reproduce this? that way we can better test what is going on

LarsWiegers commented 2 years ago

Closing as @synecdocheNORTH did not respond. feel free to reopen with a reproducable repo