wip
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
@if ($enabled)
|
||||
<div class="map-container fade">
|
||||
<div class="map" data-map-key="{{ $key }}" data-map-type="{{ $type }}" data-map-lat="{{ $lat }}" data-map-lng="{{ $lng }}" data-map-zoom="{{ $zoom }}" data-map-markers="{{ json_encode($markers) }}"></div>
|
||||
<div class="gnw-map-service gnw-map-service__{{ $service }}">
|
||||
<div class="gnw-map fade" data-map-{{ $service }}="{{ json_encode(compact('lat', 'lng', 'zoom')) }}" data-map-service="{{ json_encode(config('vendor.maps.services.'.$service)) }}" data-map-markers="{{ json_encode($markers ?? []) }}"></div>
|
||||
</div>
|
||||
{{--
|
||||
<div class="col-lg-12"></div>
|
||||
|
||||
@@ -1,16 +1,24 @@
|
||||
@if ($enabled)
|
||||
{{--TODO: If overriding type via @map() then type is not working--}}
|
||||
@if ($type == 'osm' || $type == 'bing')
|
||||
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js"
|
||||
integrity="sha512-nMMmRyTVoLYqjP9hrbed9S+FzjZHW5gY1TWCHA5ckwXZBadntCNs8kEqAWdrb9O7rxbCaA4lKTIWjDXZxflOcA=="
|
||||
crossorigin="" async defer></script>
|
||||
{{--TODO: If overriding service via @map() then service is not working--}}
|
||||
@if ($service == 'osm' || $service == 'bing' || $service == 'mapquest')
|
||||
<script src="https://unpkg.com/leaflet@1.3.4/dist/leaflet.js" integrity="sha512-nMMmRyTVoLYqjP9hrbed9S+FzjZHW5gY1TWCHA5ckwXZBadntCNs8kEqAWdrb9O7rxbCaA4lKTIWjDXZxflOcA==" crossorigin="" type="text/javascript"></script>
|
||||
{{-- TODO check if bing needs polyfill: https://github.com/digidem/leaflet-bing-layer--}}
|
||||
@endif
|
||||
@if ($type == 'mapkit')
|
||||
<script src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js" async defer></script>
|
||||
@endif
|
||||
<script src="{{ asset(mix('js/index.js', 'vendor/maps')) }}" type="text/javascript"></script>
|
||||
@if($type == 'google')
|
||||
<script src="https://maps-api-ssl.google.com/maps/api/js?v=3&ie=UTF8&oe=UTF8&key={{ $key }}&language={{ app()->getLocale() }}&callback=onGoogleMapsReady" async defer></script>
|
||||
@if ($service == 'mapkit')
|
||||
<script src="https://cdn.apple-mapkit.com/mk/5.x.x/mapkit.js" type="text/javascript"></script>
|
||||
@endif
|
||||
@if ($service == 'mapquest')
|
||||
<script src="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest-core.js" type="text/javascript"></script>
|
||||
@endif
|
||||
@if ($service == 'yandex')
|
||||
@if (!empty($key = config('vendor.maps.services.yandex.key')))
|
||||
<script src="https://enterprise.api-maps.yandex.ru/2.1/?lang=en_US&apikey={{ $key }}&onload=onYandexMapsReady" type="text/javascript" async defer></script>
|
||||
@else
|
||||
<script src="https://api-maps.yandex.ru/2.1/?lang=en_US&onload=onYandexMapsReady" type="text/javascript" async defer></script>
|
||||
@endif
|
||||
@endif
|
||||
@if ($service == 'google')
|
||||
<script src="https://maps-api-ssl.google.com/maps/api/js?v=3&ie=UTF8&oe=UTF8&key={{ config('vendor.maps.services.google.key') }}&language={{ app()->getLocale() }}&callback=onGoogleMapsReady" type="text/javascript" async defer></script>
|
||||
@endif
|
||||
@endif
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
@if ($enabled)
|
||||
@if($type == 'osm' || $type == 'bing')
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css"
|
||||
integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA=="
|
||||
crossorigin=""/>
|
||||
@if ($service == 'osm' || $service == 'bing' || $service == 'mapquest')
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.3.4/dist/leaflet.css" integrity="sha512-puBpdR0798OZvTTbP4A8Ix/l+A4dHDD0DGqYW6RQ+9jxkRFclaxxQb/SJAWZfWAkuyeQUytO7+7N4QKrDh+drA==" crossorigin="" type="text/css">
|
||||
@endif
|
||||
@if ($service == 'mapquest')
|
||||
<link rel="stylesheet" href="https://api.mqcdn.com/sdk/mapquest-js/v1.3.2/mapquest-core.css" type="text/css">
|
||||
@endif
|
||||
<link rel="stylesheet" href="{{ asset(mix('css/index.css', 'vendor/maps')) }}" type="text/css">
|
||||
@endif
|
||||
|
||||
Reference in New Issue
Block a user