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

esriLegend-layer-ordering-#105 #111

Merged
merged 2 commits into from
Sep 27, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ esriFeatureLayer directive now includes optional attributes for opacity, definit

### Changed

Map directive's `addLayer` accepts an optional index argument, and layers are now added in the order that they appear in the markup
[#104](https://github.com/Esri/angular-esri-map/issues/104)
Map directive's `addLayer` accepts an optional index argument, and layers are now added to the esriMap and esriLegend in the order that they appear in the markup.
[#104](https://github.com/Esri/angular-esri-map/issues/104) and [#111](https://github.com/Esri/angular-esri-map/issues/111)

### Documentation

Expand Down
2 changes: 1 addition & 1 deletion docs/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 style="width: 800px">
<div style="width: 600px; float:left;">
<esri-map id="map" center="map.center" zoom="map.zoom" basemap="topo" style="width: 100%" map-options="map.mapOptions">
<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="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>
<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 docs/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 col-lg-10">
<esri-map id="map" center="map.center" zoom="map.zoom" basemap="topo" style="width: 100%">
<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="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>
<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 src/directives/esriMap.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@
if (!this.layerInfos) {
this.layerInfos = [lyrInfo];
} else {
this.layerInfos.push(lyrInfo);
this.layerInfos.unshift(lyrInfo);
}
};
this.getLayerInfos = function() {
Expand Down
2 changes: 1 addition & 1 deletion test/legend.html
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ <h2>Legend</h2>
<div style="width: 800px">
<div style="width: 600px; float:left;">
<esri-map id="map" center="map.center" zoom="map.zoom" basemap="topo" style="width: 100%">
<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="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>
<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