CIM37 - Update OSM to TSS Icons
This commit is contained in:
@@ -222,12 +222,19 @@ if (!empty($responses->geolocation) || $responses->geolocation != ''){
|
||||
|
||||
$geolocation = json_decode($responses->geolocation,true);
|
||||
$view .= '<div class="content-block">
|
||||
<div id="map" style="height:300px;">
|
||||
<div id="map" style="height:300px;z-index: 0;">
|
||||
</div>
|
||||
<script>
|
||||
// initialize Leaflet
|
||||
var map = L.map(\'map\').setView({lon: '.$geolocation[1].', lat: '.$geolocation[0].'}, 10);
|
||||
|
||||
//Add TSS Avatar to MAP
|
||||
var TSSemp = L.icon({
|
||||
iconUrl: \'./assets/images/EP.png\',
|
||||
iconSize: [50, 50], // size of the icon
|
||||
});
|
||||
L.marker(['.$geolocation[0].','.$geolocation[1].'], {icon: TSSemp}).addTo(map);
|
||||
|
||||
// add the OpenStreetMap tiles
|
||||
L.tileLayer(\'https://tile.openstreetmap.org/{z}/{x}/{y}.png\', {
|
||||
maxZoom: 19,
|
||||
@@ -236,10 +243,6 @@ if (!empty($responses->geolocation) || $responses->geolocation != ''){
|
||||
|
||||
// show the scale bar on the lower left corner
|
||||
L.control.scale({imperial: true, metric: true}).addTo(map);
|
||||
|
||||
// show a marker on the map
|
||||
L.marker({lon: '.$geolocation[1].', lat: '.$geolocation[0].'}).bindPopup(\''.$responses->productname.'\').addTo(map);
|
||||
|
||||
</script>
|
||||
</div>
|
||||
';
|
||||
|
||||
Reference in New Issue
Block a user