LarsWiegers / laravel-maps

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

[Leaflet] Map not sharp #53

Closed flymia closed 4 months ago

flymia commented 4 months ago

Hello,

first: Thank you for this package, I love it and is very easy to use!

I have a question regarding the leaflet version. No matter how much I scale the map, the tiles seem to be not sharp. Here is a screenshot of the map:

CleanShot-20240421-115147

In the screenshot, I put down the map in the template using:

<x-maps-leaflet style="height: 300px; width: 300px; float: right" :zoomLevel="11" :markers="[['lat' => $lat, 'long' => $lon]]" :centerPoint="['lat' => $lat, 'long' => $lon]"></x-maps-leaflet>

Is there any way to improvie this or is this an issue with Leaflet?

Many greetings Marc

LarsWiegers commented 4 months ago

Hey Marc! Thanks for the compliments :). The basic leaflet is indeed not that great, for that I suggest looking in to other tile hosts, see this section of the readme: https://github.com/LarsWiegers/laravel-maps?tab=readme-ov-file#tilehosts

Especially mapbox is very sharp and free for up to 50,000 loads per month.

Let me know if that helps :)

flymia commented 4 months ago

Ahh, okay. I thought something was wrong with my setup. But now I know that it's a problem with leaflet. Thank you, the ticket can be closed.