You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Jul 27, 2023. It is now read-only.
Trying to add a polygon to my map below is my code
$center = new \dosamigos\leaflet\types\LatLng(['lat' => 37.7900,
'lng' => -122.401]);
$polygon = new dosamigos\leaflet\layers\Polygon(
[
'name' => 'poly',
//'map' => 'map',
'clientOptions' => [
'color' => 'red'
]
]);
$polygon->setLatLngs([
new \dosamigos\leaflet\types\LatLng(['lat' => 37.786617, 'lng' => -122.404654]),
new \dosamigos\leaflet\types\LatLng(['lat' => 37.797843, 'lng' => -122.407057]),
new \dosamigos\leaflet\types\LatLng(['lat' => 37.798962, 'lng' => -122.398260]),
new \dosamigos\leaflet\types\LatLng(['lat' => 37.794299, 'lng' => -122.395234]),
]);
$leaflet->addLayer($marker) // add the marker
->addLayer($tileLayer)
->addLayer($polygon); // add the tile layer
echo $leaflet->widget(['options' => ['style' => 'min-height: 500px']]);
if i add a polygon to the leaflet, map is not showing but when i remove the polygon and just leave a marker the map is showing.
Can someone assist with a working example of adding a polygon to the map using this extension.
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Trying to add a polygon to my map below is my code
if i add a polygon to the leaflet, map is not showing but when i remove the polygon and just leave a marker the map is showing.
Can someone assist with a working example of adding a polygon to the map using this extension.
The text was updated successfully, but these errors were encountered: