diff --git a/public/images/marker-icon-green.png b/public/images/marker-icon-green.png deleted file mode 100644 index 56db5ea..0000000 Binary files a/public/images/marker-icon-green.png and /dev/null differ diff --git a/public/images/marker-shadow.png b/public/images/marker-shadow.png deleted file mode 100644 index 84c5808..0000000 Binary files a/public/images/marker-shadow.png and /dev/null differ diff --git a/resources/views/outlets/create.blade.php b/resources/views/outlets/create.blade.php index c68f2cc..2ea1134 100644 --- a/resources/views/outlets/create.blade.php +++ b/resources/views/outlets/create.blade.php @@ -36,6 +36,7 @@ +
@endsection + +@section('styles') + + + +@endsection + +@push('scripts') + + +@endpush diff --git a/resources/views/outlets/edit.blade.php b/resources/views/outlets/edit.blade.php index 2b93e38..706d659 100644 --- a/resources/views/outlets/edit.blade.php +++ b/resources/views/outlets/edit.blade.php @@ -48,16 +48,23 @@ {!! $errors->first('address', ':message') !!} -
- - - {!! $errors->first('latitude', ':message') !!} -
-
- - - {!! $errors->first('longitude', ':message') !!} +
+
+
+ + + {!! $errors->first('latitude', ':message') !!} +
+
+
+
+ + + {!! $errors->first('longitude', ':message') !!} +
+
+
@endif @endsection + +@section('styles') + + + +@endsection + +@push('scripts') + + +@endpush diff --git a/resources/views/outlets/map.blade.php b/resources/views/outlets/map.blade.php index abc45b3..1347fb2 100644 --- a/resources/views/outlets/map.blade.php +++ b/resources/views/outlets/map.blade.php @@ -34,16 +34,7 @@ console.log(response.data); L.geoJSON(response.data, { pointToLayer: function(geoJsonPoint, latlng) { - var myIcon = L.icon({ - iconUrl: baseUrl + '/images/marker-icon-green.png', - shadowUrl: baseUrl + '/images/marker-shadow.png', - iconSize: [25, 41], - iconAnchor: [12, 41], - popupAnchor: [1, -34], - shadowSize: [41, 41], - className: 'marker-icon-green', - }); - return L.marker(latlng, { icon: myIcon }); + return L.marker(latlng); } }) .bindPopup(function (layer) { diff --git a/resources/views/outlets/show.blade.php b/resources/views/outlets/show.blade.php index 13f7774..2b2f57f 100644 --- a/resources/views/outlets/show.blade.php +++ b/resources/views/outlets/show.blade.php @@ -61,17 +61,7 @@ attribution: '© OpenStreetMap contributors' }).addTo(map); - var myIcon = L.icon({ - iconUrl: "{{ url('images/marker-icon-green.png') }}", - shadowUrl: "{{ url('images/marker-shadow.png') }}", - iconSize: [25, 41], - iconAnchor: [12, 41], - popupAnchor: [1, -34], - shadowSize: [41, 41], - className: "marker-icon-green", - }); - - L.marker([{{ $outlet->latitude }}, {{ $outlet->longitude }}], { icon: myIcon }).addTo(map) + L.marker([{{ $outlet->latitude }}, {{ $outlet->longitude }}]).addTo(map) .bindPopup('{!! $outlet->map_popup_content !!}'); @endpush