Skip to content

Commit

Permalink
update all links from HTTP to HTTPS
Browse files Browse the repository at this point in the history
  • Loading branch information
slead committed Jun 11, 2020
1 parent 6d35f31 commit e133e21
Show file tree
Hide file tree
Showing 13 changed files with 61 additions and 61 deletions.
34 changes: 17 additions & 17 deletions README.md
Expand Up @@ -13,7 +13,7 @@ BootLeaf

### Introduction

This is an update to the excellent [Bootleaf](https://github.com/bmcbride/bootleaf) code written by [Bryan McBride](https://github.com/bmcbride), which incorporates the responsive framework [Bootstrap](http://getbootstrap.com) with the lightweight [Leaflet](http://leafletjs.com) mapping API.
This is an update to the excellent [Bootleaf](https://github.com/bmcbride/bootleaf) code written by [Bryan McBride](https://github.com/bmcbride), which incorporates the responsive framework [Bootstrap](https://getbootstrap.com) with the lightweight [Leaflet](https://leafletjs.com) mapping API.

This update decouples the application logic from the map contents, and so provides a framework for rapid creation of new maps by simply updating a configuration file.

Expand All @@ -26,7 +26,7 @@ Support is provided for:
- ArcGIS Server feature, dynamic and tiled layers
- Clustering of WFS, GeoJSON and ArcGIS Server feature layers

Note - WMS and WFS layers have been tested in GeoServer only. [CORS](http://suite.opengeo.org/docs/latest/sysadmin/cors/index.html) and [jsonp](https://www.gaiaresources.com.au/json-with-geoserver-and-leaflet/) should be enabled on GeoServer for best results.
Note - WMS and WFS layers have been tested in GeoServer only. [CORS](https://suite.opengeo.org/docs/latest/sysadmin/cors/index.html) and [jsonp](https://www.gaiaresources.com.au/json-with-geoserver-and-leaflet/) should be enabled on GeoServer for best results.

Note - Bootleaf uses the [Esri-Leaflet](https://esri.github.io/esri-leaflet/) plugin, in order to support ArcGIS layers and display Esri basemaps. Please note the [Esri usage terms](https://github.com/esri/esri-leaflet#terms) before using this.

Expand Down Expand Up @@ -84,7 +84,7 @@ When editing these values, ensure that the key *names* are quoted. *Textual valu
#### Parameter explanations

- `title` : displayed in the header of the browser
- `start` : used to set the inital map extent, and other Leaflet [initiation parameters](http://leafletjs.com/reference-1.0.2.html#map-factory)
- `start` : used to set the inital map extent, and other Leaflet [initiation parameters](https://leafletjs.com/reference-1.0.2.html#map-factory)
- `about` : displayed in the map's About panel
- `bing_key` : a license key to use [Bing Maps basemap tiles](https://msdn.microsoft.com/en-us/library/ff428642.aspx)
- `mapboxKey` : a license key to use [MapBox basemap tiles](https://www.mapbox.com/help/how-access-tokens-work/)
Expand All @@ -98,8 +98,8 @@ When editing these values, ensure that the key *names* are quoted. *Textual valu
- `history` : display next/previous buttons on the map, to enable moving forward/back through the extent history
- `bookmarks` : spatial bookmarks may be saved to the config file, or added via the UI. In the latter case they're accessible via cookies on the current user's machine. Follow the pattern of the sample bookmarks to create new instances
- `activeTool` : a tool may optionally be configured as active when the map loads. Current options are `identify`, `queryWidget` (see below for more info) and `coordinate` (which reports the coordinates at the location clicked on the map)
- `defaultIcon` : optionally, override the [default icon](http://leafletjs.com/reference-1.1.0.html#icon-default) which is a blue pin, for example to specify an alternate image, or to change the size and shape of the pin. This icon is used in the geocoding result display amongst other areas
- `projections` - an array of [proj4js](http://proj4js.org/) projection definitions, which are used when projecting coordinates from other reference systems onto the map. Determine each layer's projection, then look up the details at http://spatialreference.org/. Add each layer's WKID to the `projections` array in the format:
- `defaultIcon` : optionally, override the [default icon](https://leafletjs.com/reference-1.1.0.html#icon-default) which is a blue pin, for example to specify an alternate image, or to change the size and shape of the pin. This icon is used in the geocoding result display amongst other areas
- `projections` - an array of [proj4js](https://proj4js.org/) projection definitions, which are used when projecting coordinates from other reference systems onto the map. Determine each layer's projection, then look up the details at https://spatialreference.org/. Add each layer's WKID to the `projections` array in the format:

```
"projections": [
Expand Down Expand Up @@ -141,7 +141,7 @@ Various basemaps may be included on the map, by listing the basemap IDs as shown

(Bing basemaps require a valid `bing_key` parameter in the config file)

[Leaflet Tiled basemaps](http://leafletjs.com/reference-1.0.2.html#tilelayer):
[Leaflet Tiled basemaps](https://leafletjs.com/reference-1.0.2.html#tilelayer):
- `OpenStreetMap`

![basemaps screenshot](https://i.imgur.com/ja3Z9q1.png)
Expand All @@ -168,10 +168,10 @@ To begin adding layers, find the `"layers": []` section of the config file, and
- `agsFeatureLayer` : [ArcGIS Server Feature layer](https://developers.arcgis.com/javascript/3/jsapi/featurelayer-amd.html)
- `agsDynamicLayer` : [ArcGIS Server Dynamic layer](https://developers.arcgis.com/javascript/3/jsapi/arcgisdynamicmapservicelayer-amd.html)
- `agsTiledLayer` : [ArcGIS Server Tiled layer](https://developers.arcgis.com/javascript/3/jsapi/arcgistiledmapservicelayer-amd.html)
- `geoJSON` : [Leaflet GeoJSON](http://leafletjs.com/reference-1.0.2.html#geojson)
- `wmsTiledLayer` : [Leaflet WMS Tile layer](http://leafletjs.com/reference-1.0.2.html#tilelayer-wms)
- `tileLayer` : [tiled layers](http://leafletjs.com/reference-1.0.3.html#tilelayer) which follow the pattern 'http://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png'
- `WFS` : [WFS](http://www.opengeospatial.org/standards/wfs) layers (Note: to date, testing has only been done on WFS as provided by GeoServer in GeoJSON format.)
- `geoJSON` : [Leaflet GeoJSON](https://leafletjs.com/reference-1.0.2.html#geojson)
- `wmsTiledLayer` : [Leaflet WMS Tile layer](https://leafletjs.com/reference-1.0.2.html#tilelayer-wms)
- `tileLayer` : [tiled layers](https://leafletjs.com/reference-1.0.3.html#tilelayer) which follow the pattern 'https://{s}.somedomain.com/blabla/{z}/{x}/{y}{r}.png'
- `WFS` : [WFS](https://www.opengeospatial.org/standards/wfs) layers (Note: to date, testing has only been done on WFS as provided by GeoServer in GeoJSON format.)

Note - it may be necessary to use a [reverse proxy](https://github.com/iag-geo/bootleaf/blob/master/reverseProxy.md) in order to access data from GeoServer.

Expand All @@ -185,16 +185,16 @@ Note - it may be necessary to use a [reverse proxy](https://github.com/iag-geo/b
- `layers` : `[1, 2, 3]` - applies to ArcGIS Dynamic layer, and specifies the visible layers
- `typeName` : applies to WFS layers, and specifies the GeoServer layer to draw
- `popup` : `true/false` - applies to WFS and ArcGIS Feature layers, and determines whether to show a popup when clicking on the feature
- `where` : a [SQL clause](http://resources.arcgis.com/en/help/main/10.2/index.html#/SQL_reference_for_query_expressions_used_in_ArcGIS/00s500000033000000/) to limit the features returned. Applies to WFS, wmsTiledLayer and ArcGIS Feature layers. Note that when using a `where` clause with a GeoServer layer, and also using the Identify functionality, only simple `where` clauses are supported (eg `where`: `fieldName = 'value'`)
- `where` : a [SQL clause](https://resources.arcgis.com/en/help/main/10.2/index.html#/SQL_reference_for_query_expressions_used_in_ArcGIS/00s500000033000000/) to limit the features returned. Applies to WFS, wmsTiledLayer and ArcGIS Feature layers. Note that when using a `where` clause with a GeoServer layer, and also using the Identify functionality, only simple `where` clauses are supported (eg `where`: `fieldName = 'value'`)
- `layerDefs` : a [query](https://esri.github.io/esri-leaflet/api-reference/layers/dynamic-map-layer.html) to limit the features returned, in the format `{3:"STATE_NAME='Kansas'", 2:"POP2007>25000"}`. Applies to ArcGIS Dynamic layers
- `viewParams` : a query to limit the features return from a WMS/WFS layer. This requires that the layer has been [appropriately configured as a SQL View](http://docs.geoserver.org/stable/en/user/data/database/sqlview.html) in GeoServer
- `viewParams` : a query to limit the features return from a WMS/WFS layer. This requires that the layer has been [appropriately configured as a SQL View](https://docs.geoserver.org/stable/en/user/data/database/sqlview.html) in GeoServer
- `cluster` : `true/false` - cluster point features. Applies to WFS, ArcGIS Feature and GeoJSON layers. Additional options are described on the [Leaflet cluster](https://github.com/Leaflet/Leaflet.markercluster) page
- `hidden` : `true/false` - when true, the layer will not be shown in the Table of Contents or on the map, but can still be used in the Query Widget. This can be useful to allow querying of a complex layer which can't easily be drawn on the map
- `showOnTop` : `true:false` - when true, this layer will be drawn on top of other layers. This can be used to ensure that points draw on top of polygons, etc. (Note that When multiple layers have this option set, there is the potential that they will overlap _each other_.)
- `geomField` - applies to GeoServer layers. The name of the geometry field
- `label`: `{"name": "field_name","minZoom": 10, maxZoom: 16}` - this option creates a simple text label layer based on the specified field name, with the label layer switching on/off based on the current map scale. Coincident labels are de-duplicated. Applies to WFS and GeoJson layers only
- `outputFormat` : for WFS layers, override the default `text/javascript` output format type, eg using `application/json` or `text/json` as required by the GeoServer instance
- `EPSG` - applies to GeoServer layers. The WKID value for this layer's coordinate system - see http://spatialreference.org/
- `EPSG` - applies to GeoServer layers. The WKID value for this layer's coordinate system - see https://spatialreference.org/

**Specifying and formatting fields**

Expand Down Expand Up @@ -226,8 +226,8 @@ For ArcGIS Feature Layers, if this option is specified the layer's ID field must
- `tooltipField` : `'fieldName'` - for WFS and agsFeatureLayers, you can specify the name of a field to be displayed in a simple tooltip when the user hovers over the feature

**Styling options**
- `style` : style object in [Leaflet format](http://leafletjs.com/reference.html#path-options), which will over-write the default Leaflet styles. Applies to GeoJSON and ArcGIS Feature layers
- `icon` : specify a marker [icon](http://leafletjs.com/reference.html#icon) for GeoJSON and ArcGIS Feature layers
- `style` : style object in [Leaflet format](https://leafletjs.com/reference.html#path-options), which will over-write the default Leaflet styles. Applies to GeoJSON and ArcGIS Feature layers
- `icon` : specify a marker [icon](https://leafletjs.com/reference.html#icon) for GeoJSON and ArcGIS Feature layers
- `clusterIconClass` - over-write the standard cluster styles, and apply a given style to all cluster icons in this layer. Specify a `background-color` or other CSS properties for this class in order to style the cluster appropriately

_Note that only one of these styling options may be applied to a layer as they are mutually exclusive._
Expand All @@ -236,7 +236,7 @@ Other parameters (as described in the Supported Layer Types links above) may be

## [Table of Contents](#table-of-contents)

The [table of contents](http://leafletjs.com/reference-1.0.2.html#control-layers-option) may optionally be used to allow users to switch layers on/off.
The [table of contents](https://leafletjs.com/reference-1.0.2.html#control-layers-option) may optionally be used to allow users to switch layers on/off.

![Table of Contents screenshot](https://i.imgur.com/V9Ssnke.png)

Expand Down Expand Up @@ -292,7 +292,7 @@ To enable this, add the `identify` object as an option under a Dynamic or WMS la

If `outFields` is not specified against the `identify` object, the layer's `outFields` will be used. See the `outFields` section above for more information on the field specification.

Note: If the ArcGIS Server REST API lists an alias against a field, this should be used in place of the field name. Eg in the case of [this layer](http://vmgeospatialdev.erga.aubootleaf.corp/arcgis/rest/services/admin_boundaries/EmbargoRegions_BOM_201506/MapServer/1) the *BNAME* field has an alias, so (somewhat confusingly) the *alias* should actually be specified in the `name` field:
Note: If the ArcGIS Server REST API lists an alias against a field, this should be used in place of the field name. Eg in the case of [this layer](https://vmgeospatialdev.erga.aubootleaf.corp/arcgis/rest/services/admin_boundaries/EmbargoRegions_BOM_201506/MapServer/1) the *BNAME* field has an alias, so (somewhat confusingly) the *alias* should actually be specified in the `name` field:

*BNAME ( type: esriFieldTypeString , alias: BOM river region name)*

Expand Down
4 changes: 2 additions & 2 deletions config.js
Expand Up @@ -25,7 +25,7 @@ var config = {
//"key": "AIzaS....sbW_E", // when using the Google geocoder, include your Google Maps API key (https://developers.google.com/maps/documentation/geocoding/start#get-a-key)
},
"TOC": {
//http://leafletjs.com/reference-1.0.2.html#control-layers-option
//https://leafletjs.com/reference-1.0.2.html#control-layers-option
"collapsed": false,
"uncategorisedLabel": "Layers",
"position": "topright",
Expand Down Expand Up @@ -55,7 +55,7 @@ var config = {
"bing_key": "enter your Bing Maps key",
"mapboxKey": "enter your MapBox key",
// "defaultIcon": {
// "imagePath": "http://leafletjs.com/examples/custom-icons/",
// "imagePath": "https://leafletjs.com/examples/custom-icons/",
// "iconUrl": "leaf-green.png",
// "shadowUrl": "leaf-shadow.png",
// "iconSize": [38, 95],
Expand Down
8 changes: 4 additions & 4 deletions custom.js
Expand Up @@ -11,7 +11,7 @@ function beforeMapLoads(){
// "id": "us_states",
// "name": "States",
// "type": "agsDynamicLayer",
// "url": "http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/",
// "url": "https://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Census_USA/MapServer/",
// "layers": [5],
// "useCors": false,
// "visible": true
Expand Down Expand Up @@ -40,8 +40,8 @@ function beforeMapLoads(){

function afterMapLoads(){
// This function is run after the map has loaded. It gives access to bootleaf.map, bootleaf.TOCcontrol, etc
// Check to see whether the Gray basemap is chosen, and the user has zoomed in too far. In this case,

// Check to see whether the Gray basemap is chosen, and the user has zoomed in too far. In this case,
// switch to the Streets basemap
bootleaf.map.on("zoomend", function(evt){
if (bootleaf.currentBasemap === 'Gray'){
Expand All @@ -56,4 +56,4 @@ function afterMapLoads(){
bootleaf.leafletGeocoder.on("markgeocode", function(evt){
console.log("Coordinates: ", evt.geocode.center.lat, ", ", evt.geocode.center.lng);
});
}
}
8 changes: 4 additions & 4 deletions reverseProxy.md
Expand Up @@ -6,7 +6,7 @@ Certain HTTP requests require the presence of a reverse proxy, which acts as a g

## Windows

Download nginx for windows from http://nginx.org/en/docs/windows.html then open the config file under `\conf\nginx.conf`.
Download nginx for windows from https://nginx.org/en/docs/windows.html then open the config file under `\conf\nginx.conf`.

## Mac

Expand All @@ -26,7 +26,7 @@ Specify that all requests on this machine should pass via the reverse proxy to t

```
location / {
proxy_pass http://localhost:80/;
proxy_pass https://localhost:80/;
}
```

Expand All @@ -38,7 +38,7 @@ Add the following to your nginx.conf file:

```
location /proxied_geoserver/ {
proxy_pass http://path.to.your.geoserver:8080/geoserver/;
proxy_pass https://path.to.your.geoserver:8080/geoserver/;
}
```

Expand All @@ -54,4 +54,4 @@ Then within your Bootleaf application's config.js file, specify the URL to GeoSe
}
```

Access your Bootleaf app via port 8080 in order to send the above requests via the reverse-proxy, eg http://localhost:8080/bootleaf/
Access your Bootleaf app via port 8080 in order to send the above requests via the reverse-proxy, eg https://localhost:8080/bootleaf/
10 changes: 5 additions & 5 deletions src/js/app.js
Expand Up @@ -32,7 +32,7 @@ var bootleaf = {
{"id": "esriDarkGray", "type": "esri", "theme": "DarkGray", "label": "Dark gray (ArcGIS)"},
{"id": "esriNationalGeographic", "type": "esri", "theme": "NationalGeographic", "label": "National Geographic (ArcGIS)"},
{"id": "esriOceans", "type": "esri", "theme": "Oceans", "label": "Oceans (ArcGIS)"},
{"id": "OpenStreetMap", "type": "tiled", "label": "OpenStreetMap", "url": "http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"},
{"id": "OpenStreetMap", "type": "tiled", "label": "OpenStreetMap", "url": "https://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png"},
{"id": "Aerial", "type": "bing", "label": "Bing satellite"},
{"id": "AerialWithLabels", "type": "bing", "label": "Bing satellite labels"},
{"id": "Road", "type": "bing", "label": "Bing streets"}
Expand Down Expand Up @@ -98,7 +98,7 @@ $(document).ready(function(){
"dashArray": '3'
};

// Override the default icon if an icon is specified. See http://leafletjs.com/reference-1.1.0.html#icon-default
// Override the default icon if an icon is specified. See https://leafletjs.com/reference-1.1.0.html#icon-default
if (config.defaultIcon !== undefined){
var options = ["imagePath", "iconUrl", "iconSize", "iconAnchor", "popupAnchor", "shadowUrl", "shadowSize", "shadowAnchor"];
for (var o = 0; o < options.length; o++){
Expand Down Expand Up @@ -724,17 +724,17 @@ function setBasemap(basemap){
bootleaf.basemapLayer = L.esri.basemapLayer(esriTheme, options);
} else if (basemap.type === 'tiled'){
if (basemap.id === 'OpenStreetMap') {
options.attribution = "<a href='http://www.openstreetmap.org/copyright' target='_blank'>© OpenStreetMap contributors</a>";
options.attribution = "<a href='https://www.openstreetmap.org/copyright' target='_blank'>© OpenStreetMap contributors</a>";
}
bootleaf.basemapLayer = L.tileLayer(basemap.url, options);
} else if (basemap.type === 'mapbox'){
options["attribution"] = "<a target='_blank' href='https://www.mapbox.com/about/maps/'>© Mapbox</a>, <a href='http://www.openstreetmap.org/copyright' target='_blank'>© OpenStreetMap</a>, <a href='https://www.mapbox.com/map-feedback/' target='_blank'>Improve this map</a>"
options["attribution"] = "<a target='_blank' href='https://www.mapbox.com/about/maps/'>© Mapbox</a>, <a href='https://www.openstreetmap.org/copyright' target='_blank'>© OpenStreetMap</a>, <a href='https://www.mapbox.com/map-feedback/' target='_blank'>Improve this map</a>"
var mapboxKey = config.mapboxKey || "";
if (mapboxKey === '' || mapboxKey === undefined){
$.growl.warning({ title: "Map Box error", message: "Ensure that you have specified a valid MapBox key in the config file"});
}
var mapboxTheme = basemap.theme || "streets";
bootleaf.basemapLayer = L.tileLayer("http://a.tiles.mapbox.com/v4/mapbox." + mapboxTheme + "/{z}/{x}/{y}.png?access_token=" + mapboxKey, options);
bootleaf.basemapLayer = L.tileLayer("https://a.tiles.mapbox.com/v4/mapbox." + mapboxTheme + "/{z}/{x}/{y}.png?access_token=" + mapboxKey, options);
} else if (basemap.type === 'bing'){
var options = {
"bingMapsKey": config.bing_key,
Expand Down
2 changes: 1 addition & 1 deletion src/plugins/WFST/Leaflet-WFST.min.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/plugins/WSFT/Leaflet-WFST.min.js

Large diffs are not rendered by default.

0 comments on commit e133e21

Please sign in to comment.