Skip to content

Commit

Permalink
Moving to a CUGOS mapbox token and updating to mapboxjs 3.2.0.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronr committed Jun 26, 2019
1 parent bac3c42 commit 4e5d2e2
Show file tree
Hide file tree
Showing 6 changed files with 118 additions and 12 deletions.
16 changes: 10 additions & 6 deletions css/bbox.css
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ html, body, #map {

#map-ui-proj {
position: absolute;
top: 420px;
top: 460px;
left: 10px;
list-style: none;
margin: 0;
Expand Down Expand Up @@ -172,8 +172,8 @@ html, body, #map {

#map-ui {
position: absolute;
top: 300px;
left: 10px;
top: 330px;
left: 12px;
list-style: none;
margin: 0;
padding: 0;
Expand All @@ -183,9 +183,9 @@ html, body, #map {
#map-ui a {
background-color: #fff;
border-bottom: 1px solid #ccc;
width: 26px;
height: 26px;
line-height: 26px;
width: 30px;
height: 30px;
line-height: 30px;
display: block;
text-align: center;
text-decoration: none;
Expand Down Expand Up @@ -261,6 +261,10 @@ html, body, #map {
font-size: large;
}

.leaflet-sidebar .close{
z-index:10001;
}

.ui-autocomplete {
max-height: 180px;
overflow-y: auto;
Expand Down
35 changes: 35 additions & 0 deletions css/maps/images/icons.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
1 change: 1 addition & 0 deletions css/maps/mapbox.v3.2.0.css

Large diffs are not rendered by default.

4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,17 @@
<link rel="stylesheet" href="css/maps/leaflet.css" />
<link rel="stylesheet" href="css/maps/leaflet.draw.css" />
<link rel="stylesheet" href="css/maps/leaflet.sidebar.css" />
<link rel="stylesheet" href="css/maps/mapbox.standalone.css" />
<link rel="stylesheet" href="css/maps/mapbox.v3.2.0.css" />
<link rel="stylesheet" href="css/libs/ui-lightness/jquery-ui-1.10.3.custom.css" />
<link rel="stylesheet" href="css/bbox.css" />

<script src="js/libs/jquery-1.9.1.min.js"></script>
<script src="js/libs/jquery-ui-1.10.3.custom.js"></script>
<script src="js/libs/ZeroClipboard.min.js"></script>
<script src="js/maps/leaflet.js"></script>
<script src="js/maps/mapbox.v3.2.0.js"></script>
<script src="js/maps/leaflet.draw.js"></script>
<script src="js/maps/leaflet.sidebar.js"></script>
<script src="js/maps/mapbox.standalone.js"></script>
<script src="js/maps/wkt.parser.js"></script>
<script src="js/maps/proj4-src.js"></script>
<script src="js/maps/proj4leaflet.js"></script>
Expand Down
8 changes: 4 additions & 4 deletions js/bbox.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
var map, rsidebar, lsidebar, drawControl, drawnItems = null;
var apikey = window.location.hostname.indexOf('bboxfinder.com') !== -1 ? 'reprojected.g9on3k93' : 'examples.map-9ijuk24y';

// Where we keep the big list of proj defs from the server
var proj4defs = null;
Expand Down Expand Up @@ -466,7 +465,8 @@ $(document).ready(function() {
// Have to init the projection input box as it is used to format the initial values
$( "#projection" ).val(currentproj);

map = L.mapbox.map('map', apikey).setView([0, 0], 3);
L.mapbox.accessToken = 'pk.eyJ1IjoiY3Vnb3MiLCJhIjoiY2p4Nm43MzA3MDFmZDQwcGxsMjB4Z3hnNiJ9.SQbnMASwdqZe6G4n6OMvVw';
map = L.mapbox.map('map').setView([0, 0], 3).addLayer(L.mapbox.styleLayer('mapbox://styles/mapbox/streets-v11'));

rsidebar = L.control.sidebar('rsidebar', {
position: 'right',
Expand Down Expand Up @@ -532,8 +532,8 @@ $(document).ready(function() {
);
bounds.on('bounds-set', function( e ) {
// move it to the end of the parent
var parent = e.target._container.parentElement;
$( parent ).append( e.target._container );
var parent = e.target._renderer._container.parentElement;
$( parent ).append( e.target._renderer._container );
// Set the hash
var southwest = this.getBounds().getSouthWest();
var northeast = this.getBounds().getNorthEast();
Expand Down
66 changes: 66 additions & 0 deletions js/maps/mapbox.v3.2.0.js

Large diffs are not rendered by default.

0 comments on commit 4e5d2e2

Please sign in to comment.