Skip to content
This repository has been archived by the owner on Dec 1, 2020. It is now read-only.

Commit

Permalink
Merge pull request #181 from Esri/https
Browse files Browse the repository at this point in the history
play nice(r) w/ HTTPS
  • Loading branch information
Jacob Wasilkowski committed Dec 15, 2015
2 parents 66fc204 + edb1c98 commit f39d504
Show file tree
Hide file tree
Showing 35 changed files with 120 additions and 104 deletions.
17 changes: 16 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,20 @@ This project adheres to [Semantic Versioning](http://semver.org/).

[Upcoming changes][unreleased]

## [v1.0.1]

### Changed

esriLoader defaults to loading JSAPI using the same protocol (HTTP or HTTPS) as the page. [#179](https://github.com/Esri/angular-esri-map/issues/179)

### Documentation

Use protocol agnostic links to resouces [#179](https://github.com/Esri/angular-esri-map/issues/179) [@JamesMilnerUK](https://github.com/JamesMilnerUK)

### Tests

Use protocol agnostic links to resouces in test pages [#179](https://github.com/Esri/angular-esri-map/issues/179)

## [v1.0.0]

### Changed
Expand Down Expand Up @@ -189,7 +203,8 @@ Thank you to @willisd2, @ScottONeal, @thinking-aloud, and @jwasil for their cont
* Initial public release.
* Includes directives for map, features layers, and legend and services to facilitate loading Esri modules and enabling controllers to reference the map object.

[unreleased]: https://github.com/Esri/angular-esri-map/compare/v1.0.0...HEAD
[unreleased]: https://github.com/Esri/angular-esri-map/compare/v1.0.1...HEAD
[v1.0.1]: https://github.com/Esri/angular-esri-map/compare/v1.0.0...v1.0.1
[v1.0.0]: https://github.com/Esri/angular-esri-map/compare/v1.0.0-rc.2...v1.0.0
[v1.0.0-rc.2]: https://github.com/Esri/angular-esri-map/compare/v1.0.0-rc.1...v1.0.0-rc.2
[v1.0.0-rc.1]: https://github.com/Esri/angular-esri-map/compare/v1.0.0-beta.5...v1.0.0-rc.1
Expand Down
2 changes: 1 addition & 1 deletion bower.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-esri-map",
"version": "1.0.0",
"version": "1.0.1",
"homepage": "https://github.com/Esri/angular-esri-map",
"authors": [
"Javier Abadía <[email protected]> (https://github.com/jabadia)",
Expand Down
1 change: 1 addition & 0 deletions gulpfile.js
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ gulp.task('serve', ['karma-once', 'build'], function() {
},
open: true,
port: 9002,
https: true,
notify: false
});

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "angular-esri-map",
"version": "1.0.0",
"version": "1.0.1",
"description": "A collection of directives to help you use Esri maps and services in your Angular applications",
"main": "dist/angular-esri-map.js",
"dependencies": {},
Expand Down
4 changes: 2 additions & 2 deletions site/app/examples/add-remove-layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,11 @@ angular.module('esri-map-docs')
$scope.layers = [
{
name: 'Heritage Trees',
url: 'http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Heritage_Trees_Portland/FeatureServer/0'
url: '//services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Heritage_Trees_Portland/FeatureServer/0'
},
{
name: 'Parks',
url: 'http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Portland_Parks/FeatureServer/0'
url: '//services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Portland_Parks/FeatureServer/0'
}
];

Expand Down
4 changes: 2 additions & 2 deletions site/app/examples/additional-map-options.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ <h2>Additional Map Options</h2>
<div class="row">
<div class="col-xs-8 col-sm-9">
<esri-map id="map" center="map.center" zoom="map.zoom" basemap="topo" map-options="map.mapOptions">
<esri-feature-layer title="Water Bodies" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/0"></esri-feature-layer>
<esri-feature-layer title="Rivers" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/1"></esri-feature-layer>
<esri-feature-layer title="Water Bodies" url="//sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/0"></esri-feature-layer>
<esri-feature-layer title="Rivers" url="//sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/1"></esri-feature-layer>
<div esri-legend target-id="legend"></div>
</esri-map>
<p>Lat: {{ map.center.lat | number:3 }}, Lng: {{ map.center.lng | number:3 }}, Zoom: {{ map.zoom }}</p>
Expand Down
2 changes: 1 addition & 1 deletion site/app/examples/custom-basemap.html
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<h2>Custom Basemap</h2>
<!-- add map to page and bind to scope map parameters -->
<esri-map id="map"
<esri-map id="map"
map-options="{
center: [-111.879655861, 40.571338776],
zoom: 13,
Expand Down
4 changes: 2 additions & 2 deletions site/app/examples/custom-basemap.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ angular.module('esri-map-docs')
// that way we could just use the basemap name in either
// the map directive's basemap or map-options attributes
esriMapUtils.addCustomBasemap('delorme', {
urls: ['http://services.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer'],
urls: ['//services.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer'],
title: 'DeLorme',
thumbnailUrl: 'http://servername.fqdn.suffix/images/thumbnail_2014-11-25_61051.png'
thumbnailUrl: '//servername.fqdn.suffix/images/thumbnail_2014-11-25_61051.png'
}).then(function(esriBasemaps) {
console.log(esriBasemaps);
// because we are adding the basemap in the controller,
Expand Down
2 changes: 1 addition & 1 deletion site/app/examples/dynamic-map-service-layer.html
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<h2>Dynamic Map Service Layer</h2>
<!-- add map to page and bind to scope map parameters -->
<esri-map id="map" map-options="{ sliderOrientation : 'horizontal' }">
<esri-dynamic-map-service-layer url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer" visible="{{dynamicLayer.visible}}" opacity="{{dynamicLayer.opacity}}" layer-options="{ imageParameters: { format: 'jpeg' } }" ></esri-dynamic-map-service-layer>
<esri-dynamic-map-service-layer url="//sampleserver1.arcgisonline.com/ArcGIS/rest/services/Demographics/ESRI_Population_World/MapServer" visible="{{dynamicLayer.visible}}" opacity="{{dynamicLayer.opacity}}" layer-options="{ imageParameters: { format: 'jpeg' } }" ></esri-dynamic-map-service-layer>
</esri-map>
<p><input type="checkbox" ng-model="dynamicLayer.visible" /> World Population - opacity: <input type="number" step="0.1" min="0" max="1" ng-model="dynamicLayer.opacity" /></p>
<p>Based on <a href="https://developers.arcgis.com/javascript/jssamples/map_dynamic.html">this sample</a>.</p>
Expand Down
2 changes: 1 addition & 1 deletion site/app/examples/dynamic-map-service-layers.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ <h2>Multiple Dynamic Map Service Layers</h2>
<!-- dynamic map service layer w/ inline url and options
as well as info template defined in a directive -->
<esri-dynamic-map-service-layer
url="http://sampleserver1.arcgisonline.com/ArcGIS/rest/services/Petroleum/KGS_OilGasFields_Kansas/MapServer"
url="//sampleserver1.arcgisonline.com/ArcGIS/rest/services/Petroleum/KGS_OilGasFields_Kansas/MapServer"
layer-options="{ id: 'oilAndGasLayer', opacity: 0.75 }">
<esri-info-template layer-id="0" title="<b>Oil and Gas data</b>">
${FIELD_NAME} production field<br>
Expand Down
2 changes: 1 addition & 1 deletion site/app/examples/dynamic-map-service-layers.js
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@ angular.module('esri-map-docs')
};

$scope.demographicsLayer = {
url: 'http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer',
url: '//sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer',
options: {
id: 'demographicsLayer',
opacity: 0.8,
Expand Down
10 changes: 5 additions & 5 deletions site/app/examples/feature-layers.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,18 +3,18 @@ <h2>Feature Layers</h2>
<esri-map id="map" center="map.center" zoom="map.zoom" basemap="topo">
<!-- a feature layer with optional visible and definition-expression attributes -->
<esri-feature-layer
url="http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Heritage_Trees_Portland/FeatureServer/0"
visible="{{map.showTrees}}"
url="//services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Heritage_Trees_Portland/FeatureServer/0"
visible="{{map.showTrees}}"
definition-expression="{{map.treesDefExpression}}">
</esri-feature-layer>
<!-- a feature layer with an optional layer-options attribute -->
<esri-feature-layer
url="http://services.arcgis.com/rOo16HdIMeOBI4Mb/ArcGIS/rest/services/Portland_Light_Rail_Lines/FeatureServer/0"
url="//services.arcgis.com/rOo16HdIMeOBI4Mb/ArcGIS/rest/services/Portland_Light_Rail_Lines/FeatureServer/0"
layer-options="map.railLayerOptions">
</esri-feature-layer>
<!-- a feature layer with an optional opacity attribute -->
<esri-feature-layer
url="http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Portland_Parks/FeatureServer/0"
url="//services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Portland_Parks/FeatureServer/0"
opacity="{{map.parksOpacity}}">
</esri-feature-layer>
</esri-map>
Expand All @@ -33,7 +33,7 @@ <h2>Feature Layers</h2>
<p>If <code>visible</code>, <code>opacity</code>, or <code>definition-expression</code> are provided as standalone optional properties, they will override those same properties in the additional layer options.</p>
</div>

<p>Based on <a href="http://jsfiddle.net/patrickarlt/xy3nm1sq/1/">this JS Fiddle</a>.</p>
<p>Based on <a href="https://jsfiddle.net/patrickarlt/xy3nm1sq/1/">this JS Fiddle</a>.</p>
<p>Documentation:
<a href="./docs/#/api/esri.map.directive:esriFeatureLayer">esri-feature-layer</a>,
<a href="./docs/#/api/esri.map.directive:esriMap">esri-map</a>
Expand Down
4 changes: 2 additions & 2 deletions site/app/examples/layer-events.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ <h2>Layer Events</h2>
<!-- add map to page and bind to scope map parameters -->
<esri-map id="map" center="map.center" zoom="map.zoom" basemap="topo">
<esri-feature-layer
url="http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Heritage_Trees_Portland/FeatureServer/0"
url="//services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Heritage_Trees_Portland/FeatureServer/0"
visible="{{map.showTrees}}"
load="treesLayerLoaded"
update-end="treesLayerUpdateEnd">
</esri-feature-layer>
<esri-dynamic-map-service-layer
url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer"
url="//sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer"
layer-options="{ id: 'demographicsLayer', opacity: 0.8, showAttribution: false }"
visible-layers="1,2"
load="demographicsLayerLoaded"
Expand Down
4 changes: 2 additions & 2 deletions site/app/examples/legend.html
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ <h2>Legend</h2>
<div class="row">
<div class="col-xs-8 col-sm-9">
<esri-map id="map" center="map.center" zoom="map.zoom" basemap="topo" style="width: 100%">
<esri-feature-layer title="Water Bodies" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/0"></esri-feature-layer>
<esri-feature-layer title="Rivers" url="http://sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/1"></esri-feature-layer>
<esri-feature-layer title="Water Bodies" url="//sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/0"></esri-feature-layer>
<esri-feature-layer title="Rivers" url="//sampleserver3.arcgisonline.com/ArcGIS/rest/services/Hydrography/Watershed173811/MapServer/1"></esri-feature-layer>
<div esri-legend target-id="legend"></div>
</esri-map>
<p>Lat: {{ map.center.lat | number:3 }}, Lng: {{ map.center.lng | number:3 }}, Zoom: {{map.zoom}}</p>
Expand Down
6 changes: 3 additions & 3 deletions site/app/examples/no-basemap.html
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ <h2>No Basemap and Advanced Map Options</h2>
<h4>Providing an Optional Extent and Adding a Feature Layer</h4>
<!-- add map to page and bind to scope map parameters -->
<esri-map id="map" center="map.center" zoom="map.zoom" map-options="map.mapOptions" extent-change="extentChanged">
<esri-feature-layer title="States" url="http://sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3"></esri-feature-layer>
<esri-feature-layer title="States" url="//sampleserver6.arcgisonline.com/arcgis/rest/services/Census/MapServer/3"></esri-feature-layer>
</esri-map>

<p>
Expand All @@ -11,8 +11,8 @@ <h4>Providing an Optional Extent and Adding a Feature Layer</h4>
</p>
<p>Current Scale: {{ map.scale | number:0 }}</p>
<p>Min Scale: {{ map.mapOptions.minScale | number:0 }}, Max Scale: {{ map.mapOptions.maxScale | number:0 }}</p>
<p>Slider Orientation: {{ map.mapOptions.sliderOrientation }},
Slider Position: {{ map.mapOptions.sliderPosition }},
<p>Slider Orientation: {{ map.mapOptions.sliderOrientation }},
Slider Position: {{ map.mapOptions.sliderPosition }},
Display Graphics on Pan: {{ map.mapOptions.displayGraphicsOnPan }}</p>

<p>Inspired by <a href="https://developers.arcgis.com/javascript/jssamples/fl_any_projection.html">this sample</a>.</p>
Expand Down
4 changes: 2 additions & 2 deletions site/app/examples/other-esri-modules.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ angular.module('esri-map-docs')

var tb;

// markerSymbol is used for point and multipoint, see http://raphaeljs.com/icons/#talkq for more examples
// markerSymbol is used for point and multipoint, see //raphaeljs.com/icons/#talkq for more examples
var markerSymbol = new SimpleMarkerSymbol();
markerSymbol.setPath('M16,4.938c-7.732,0-14,4.701-14,10.5c0,1.981,0.741,3.833,2.016,5.414L2,25.272l5.613-1.44c2.339,1.316,5.237,2.106,8.387,2.106c7.732,0,14-4.701,14-10.5S23.732,4.938,16,4.938zM16.868,21.375h-1.969v-1.889h1.969V21.375zM16.772,18.094h-1.777l-0.176-8.083h2.113L16.772,18.094z');
markerSymbol.setColor(new Color('#00FFFF'));
Expand All @@ -41,7 +41,7 @@ angular.module('esri-map-docs')
// the images folder contains additional fill images, other options: sand.png, swamp.png or stiple.png
var fillSymbol = new PictureFillSymbol(
// 'images/mangrove.png',
'http://developers.arcgis.com/javascript/samples/graphics_add/images/mangrove.png',
'//developers.arcgis.com/javascript/samples/graphics_add/images/mangrove.png',
new SimpleLineSymbol(
SimpleLineSymbol.STYLE_SOLID,
new Color('#000'),
Expand Down
2 changes: 1 addition & 1 deletion src/core/esriLoader.js
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@
// Create Script Object to be loaded
var script = document.createElement('script');
script.type = 'text/javascript';
script.src = opts.url || 'http://js.arcgis.com/3.15compact';
script.src = opts.url || window.location.protocol + '//js.arcgis.com/3.15compact';

// Set onload callback to resolve promise
script.onload = function() { deferred.resolve( window.require ); };
Expand Down
10 changes: 5 additions & 5 deletions test/add-remove-layers.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>Add/Remove Layers</title>

<!-- load Esri CSS -->
<link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.11/esri/css/esri.css">
<link rel="stylesheet" type="text/css" href="//js.arcgis.com/3.11/esri/css/esri.css">
</head>
<body ng-controller="MapController">
<h2>Add/Remove Layers</h2>
Expand All @@ -24,9 +24,9 @@ <h2>Add/Remove Layers</h2>
<input type="checkbox" ng-model="selected" ng-change="toggleLayer(layer.url)" /> {{layer.name}} <br />
</div>
<!-- load Esri JavaScript API -->
<script type="text/javascript" src="http://js.arcgis.com/3.11compact"></script>
<script type="text/javascript" src="//js.arcgis.com/3.11compact"></script>
<!-- load Angular -->
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.js"></script>
<!-- load angular-esri-map directives -->
<script src="lib/angular-esri-map.js"></script>
<!-- run example app controller -->
Expand All @@ -38,11 +38,11 @@ <h2>Add/Remove Layers</h2>
$scope.layers = [
{
name: 'Heritage Trees',
url: 'http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Heritage_Trees_Portland/FeatureServer/0'
url: '//services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Heritage_Trees_Portland/FeatureServer/0'
},
{
name: 'Parks',
url: 'http://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Portland_Parks/FeatureServer/0'
url: '//services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Portland_Parks/FeatureServer/0'
}
];

Expand Down
8 changes: 4 additions & 4 deletions test/additional-map-options.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>Additional Map Options</title>

<!-- load Esri CSS -->
<link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.11/esri/css/esri.css">
<link rel="stylesheet" type="text/css" href="//js.arcgis.com/3.11/esri/css/esri.css">
</head>
<body ng-controller="MapController">
<h2>Additional Map Options</h2>
Expand Down Expand Up @@ -45,10 +45,10 @@ <h3>Inline Object Hash Attribute String, along with a WebmapId</h3>
</p>
</div>
<!-- load Esri JavaScript API -->
<script type="text/javascript" src="http://js.arcgis.com/3.11compact"></script>
<script type="text/javascript" src="//js.arcgis.com/3.11compact"></script>
<!-- load Angular -->
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.js"></script>
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular-sanitize.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular-sanitize.js"></script>
<!-- load angular-esri-map directives -->
<script src="lib/angular-esri-map.js"></script>
<!-- run example app controller -->
Expand Down
10 changes: 5 additions & 5 deletions test/custom-basemap.html
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
<title>Custom Basemap</title>

<!-- load Esri CSS -->
<link rel="stylesheet" type="text/css" href="http://js.arcgis.com/3.13/esri/css/esri.css">
<link rel="stylesheet" type="text/css" href="//js.arcgis.com/3.13/esri/css/esri.css">
</head>
<body ng-controller="MapController">
<h2>Custom Basemap</h2>
Expand All @@ -19,9 +19,9 @@ <h2>Custom Basemap</h2>
</esri-map>
<p>Based on the example in <a href="https://developers.arcgis.com/javascript/jsapi/esri.basemaps-amd.html">this API reference page</a>.</p>
<!-- load Esri JavaScript API -->
<script type="text/javascript" src="http://js.arcgis.com/3.13compact"></script>
<script type="text/javascript" src="//js.arcgis.com/3.13compact"></script>
<!-- load Angular -->
<script src="http://ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
<script src="//ajax.googleapis.com/ajax/libs/angularjs/1.3.0/angular.min.js"></script>
<!-- load angular-esri-map directives -->
<script src="lib/angular-esri-map.js"></script>
<!-- run example app controller -->
Expand All @@ -32,9 +32,9 @@ <h2>Custom Basemap</h2>
// add "delorme" basemap
// NOTE: it would be best to do this in a route's resolve
esriMapUtils.addCustomBasemap('delorme', {
urls: ['http://services.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer'],
urls: ['//services.arcgisonline.com/ArcGIS/rest/services/Specialty/DeLorme_World_Base_Map/MapServer'],
title: 'DeLorme',
thumbnailUrl: 'http://servername.fqdn.suffix/images/thumbnail_2014-11-25_61051.png'
thumbnailUrl: '//servername.fqdn.suffix/images/thumbnail_2014-11-25_61051.png'
}).then(function(esriBasemaps) {
console.log(esriBasemaps);
// esri registry is only needed b/c basemap was not added before
Expand Down
Loading

0 comments on commit f39d504

Please sign in to comment.