Commit 14d342cc authored by dmorley's avatar dmorley

Merge branch 'mapbox' into 'develop'

fixed mapbox

See merge request diasporg/Poduptime!252
parents c1b012c7 575b700d
Pipeline #4101 failed with stage
in 4 seconds
......@@ -13,6 +13,7 @@ The format is based on [Keep a Changelog] and this project adheres to [Semantic
### Added
- maxmind license key in config.php - now required by maxmind
### Changed
- mapbox api url structure
### Deprecated
### Removed
### Fixed
......
......@@ -125,11 +125,13 @@ EOF;
?>
]
};
var tiles = L.tileLayer('https://{s}.tiles.mapbox.com/v4/mapbox.streets/{z}/{x}/{y}.jpg70?access_token=<?php echo c('mapboxkey'); ?>', {
var tiles = L.tileLayer('https://api.mapbox.com/styles/v1/{id}/tiles/{z}/{x}/{y}?access_token=<?php echo c('mapboxkey'); ?>', {
maxZoom: 18,
id: 'mapbox/streets-v11',
accessToken: '<?php echo c('mapboxkey'); ?>',
attribution: '<a href="https://www.mapbox.com/about/maps/" target="_blank">&copy; Mapbox &copy; OpenStreetMap</a> <a class="mapbox-improve-map" href="https://www.mapbox.com/map-feedback/" target="_blank">Improve this map</a>'
});
var map = L.map('map', {zoom: 4, center: [<?php echo $lat; ?>, <?php echo $long; ?>]}).addLayer(tiles);
var map = L.map('map', {zoom: 5, center: [<?php echo $lat; ?>, <?php echo $long; ?>]}).addLayer(tiles);
var markers = L.markerClusterGroup({
maxClusterRadius: 2, animateAddingMarkers: true, iconCreateFunction: function (cluster) {
return new L.DivIcon({html: '<b class="icon">' + cluster.getChildCount() + '</b>', className: 'mycluster', iconSize: L.point(35, 35)});
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment