minor optical change
This commit is contained in:
@@ -134,10 +134,11 @@
|
||||
</div>
|
||||
|
||||
</div>
|
||||
|
||||
<div class="col-lg-6">
|
||||
<div id="building-map" style="height:420px;width:100%"></div>
|
||||
</div>
|
||||
<?php if($building->gps_lat && $building->gps_long): ?>
|
||||
<div class="col-lg-6">
|
||||
<div id="building-map" style="height:420px;width:100%"></div>
|
||||
</div>
|
||||
<?php endif; ?>
|
||||
</div>
|
||||
|
||||
<?php if($building->gps_lat && $building->gps_long): ?>
|
||||
@@ -251,28 +252,29 @@
|
||||
|
||||
|
||||
|
||||
<?php if($building->gps_lat && $building->gps_long): ?>
|
||||
|
||||
var gpslat = <?=($building->gps_lat) ? $building->gps_lat : 0?>;
|
||||
var gpslong = <?=($building->gps_long) ? $building->gps_long : 0?>;
|
||||
console.log(gpslat + "," + gpslong);
|
||||
|
||||
// Building Map
|
||||
var buildingMap = L.map('building-map').setView([gpslat, gpslong], 18);
|
||||
var gpslat = <?=($building->gps_lat) ? $building->gps_lat : 0?>;
|
||||
var gpslong = <?=($building->gps_long) ? $building->gps_long : 0?>;
|
||||
console.log(gpslat + "," + gpslong);
|
||||
|
||||
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
|
||||
//L.tileLayer('<?=self::getResourcePath()?>assets/map/{id}/{z}/{x}/{y}.png', {
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||
minZoom: 12,
|
||||
maxZoom: 22,
|
||||
//id: 'OSMPublicTransport',
|
||||
//id: 'mapbox.streets',
|
||||
id: 'mapbox/streets-v11',
|
||||
//id: 'mapbox.pirates',
|
||||
accessToken: 'pk.eyJ1Ijoic2tuZXR3b3J4IiwiYSI6ImNqdWw3eXoyMzBieWU0M284OTU2eWNxMTMifQ.GrgBYKMXVt3TiwU53OBllQ'
|
||||
}).addTo(buildingMap);
|
||||
|
||||
var marker = L.marker([gpslat, gpslong]).addTo(buildingMap);
|
||||
|
||||
// Building Map
|
||||
var buildingMap = L.map('building-map').setView([gpslat, gpslong], 18);
|
||||
|
||||
L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token={accessToken}', {
|
||||
//L.tileLayer('<?=self::getResourcePath()?>assets/map/{id}/{z}/{x}/{y}.png', {
|
||||
attribution: 'Map data © <a href="https://www.openstreetmap.org/">OpenStreetMap</a> contributors, <a href="https://creativecommons.org/licenses/by-sa/2.0/">CC-BY-SA</a>, Imagery © <a href="https://www.mapbox.com/">Mapbox</a>',
|
||||
minZoom: 12,
|
||||
maxZoom: 22,
|
||||
//id: 'OSMPublicTransport',
|
||||
//id: 'mapbox.streets',
|
||||
id: 'mapbox/streets-v11',
|
||||
//id: 'mapbox.pirates',
|
||||
accessToken: 'pk.eyJ1Ijoic2tuZXR3b3J4IiwiYSI6ImNqdWw3eXoyMzBieWU0M284OTU2eWNxMTMifQ.GrgBYKMXVt3TiwU53OBllQ'
|
||||
}).addTo(buildingMap);
|
||||
|
||||
var marker = L.marker([gpslat, gpslong]).addTo(buildingMap);
|
||||
<?php endif; ?>
|
||||
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user