Skip to content

v1.2.0

Compare
Choose a tag to compare
@vitormicillo vitormicillo released this 01 Oct 14:50
· 23 commits to master since this release

New option to disable Geoman tools bar in the map

Map::make('location')
      ->label('Location')
      ->columnSpanFull()
      ->defaultLocation(latitude: 52.8027, longitude: -1.0546)
      ->afterStateUpdated(function (Set $set, ?array $state): void {
             $set('latitude', $state['lat']);
             $set('longitude', $state['lng']);
      })
      ->afterStateHydrated(function ($state, $record, Set $set): void {
            // Use this to set the map in the marker location (edit)
           $set('location', ['lat' => $record->latitude, 'lng' => $record->longitude]);
      })
      ->extraStyles([
           'min-height: 50vh',
           'border-radius: 10px'
      ])
      ->liveLocation(true, true, 10000) // Updates live location every 10 seconds
      ->showMarker()
      ->showGeomanToolbar() // Display or not the geoman tools bar
      ->showFullscreenControl()
      ->showZoomControl()
      ->draggable()
      ->tilesUrl("https://tile.openstreetmap.de/{z}/{x}/{y}.png")
      ->zoom(12)
      ->detectRetina()
      ->showMyLocationButton()
      ->extraTileControl([])
      ->extraControl([
          'zoomDelta'    => 1,
          'zoomSnap'    => 2,
      ])

Full Changelog: v1.1.1...v1.2.0