Skip to content

Instantly share code, notes, and snippets.

@knu2xs
Created July 19, 2014 17:30
Show Gist options
  • Select an option

  • Save knu2xs/f940998ad9c5d697143e to your computer and use it in GitHub Desktop.

Select an option

Save knu2xs/f940998ad9c5d697143e to your computer and use it in GitHub Desktop.
Use point symbology with a feature layer in Leaflet/Esri-Leaflet
var iconFs = L.icon({
iconUrl: 'http://services.arcgis.com/SgB3dZDkkUxpEHxu/ArcGIS/rest/services/huc17_accesses/FeatureServer/0/images/d66f4bf18356e409c6221a46633b935a',
iconSize: [14, 15],
iconAnchor: [0, 0]
});
var layer = L.esri.featureLayer('http://services.arcgis.com/SgB3dZDkkUxpEHxu/arcgis/rest/services/huc17_accesses/FeatureServer/0', {
pointToLayer: function (feature, latlng) {
return L.marker(latlng, { icon: conFs} );
}
});
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment