Skip to content

Commit

Permalink
Merge pull request Esri#418 from patrickarlt/geojson-support
Browse files Browse the repository at this point in the history
Use f=geojson if possible for FeatureLayer
  • Loading branch information
patrickarlt committed Dec 26, 2014
2 parents ced40a0 + 734415c commit 1b283fc
Show file tree
Hide file tree
Showing 6 changed files with 63 additions and 32 deletions.
14 changes: 7 additions & 7 deletions spec/Layers/FeatureLayer/FeatureLayerSpec.js
Original file line number Diff line number Diff line change
Expand Up @@ -52,7 +52,7 @@ describe('L.esri.Layers.FeatureLayer', function () {
})];

beforeEach(function(){
layer = L.esri.featureLayer('http://services.arcgis.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0', {
layer = L.esri.featureLayer('http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0', {
timeField: 'time',
pointToLayer: function(feature, latlng){
return L.circleMarker(latlng);
Expand All @@ -63,7 +63,7 @@ describe('L.esri.Layers.FeatureLayer', function () {
});

it('should fire a createfeature event', function(done){
layer = L.esri.featureLayer('http://services.arcgis.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0', {
layer = L.esri.featureLayer('http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0', {
timeField: 'time',
pointToLayer: function(feature, latlng){
return L.circleMarker(latlng);
Expand All @@ -79,7 +79,7 @@ describe('L.esri.Layers.FeatureLayer', function () {
});

it('should have an alias at L.esri.Layers.featureLayer', function(){
var layer = L.esri.Layers.featureLayer('http://services.arcgis.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0');
var layer = L.esri.Layers.featureLayer('http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0');
expect(layer).to.be.an.instanceof(L.esri.Layers.FeatureLayer);
});

Expand Down Expand Up @@ -227,7 +227,7 @@ describe('L.esri.Layers.FeatureLayer', function () {
});

it('should unbind popups on multi polygon features', function(){
layer = L.esri.featureLayer('http://services.arcgis.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0', { timeField: 'time' }).addTo(map);
layer = L.esri.featureLayer('http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0', { timeField: 'time' }).addTo(map);

layer.createLayers(multiPolygon);
layer.bindPopup(function(feature){
Expand All @@ -239,7 +239,7 @@ describe('L.esri.Layers.FeatureLayer', function () {
});

it('should reset style on multi polygon features', function(){
layer = L.esri.featureLayer('http://services.arcgis.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0', {
layer = L.esri.featureLayer('http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0', {
style: {
color: 'black'
}
Expand All @@ -259,7 +259,7 @@ describe('L.esri.Layers.FeatureLayer', function () {
});

it('should reset to default style on multi polygon features', function(){
layer = L.esri.featureLayer('http://services.arcgis.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0').addTo(map);
layer = L.esri.featureLayer('http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0').addTo(map);

layer.createLayers(multiPolygon);

Expand Down Expand Up @@ -294,7 +294,7 @@ describe('L.esri.Layers.FeatureLayer', function () {

it('should run a function against every feature', function(){
var spy = sinon.spy();
layer = L.esri.featureLayer('http://services.arcgis.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0', {
layer = L.esri.featureLayer('http://gis.example.com/mock/arcgis/rest/services/MockService/MockFeatureServer/0', {
onEachFeature: spy
}).addTo(map);
layer.createLayers(features);
Expand Down
Loading

0 comments on commit 1b283fc

Please sign in to comment.