2017-08-23 4 views
0

Je veux ajouter un marqueur en utilisant dépliant esri panier,Ajouter un marqueur à l'aide dépliant esri

Mon code pour ajouter un marqueur à l'aide MapBox est donnée comme suit:

var marker = L.marker(new L.LatLng(lat, long), { 
     icon: L.mapbox.marker.icon({ 
      'marker-color': 'ff8888' 
     }), 
     draggable: true 
     }); 
     marker.bindPopup('adresse'); 
     marker.addTo(map); 

Je veux utiliser la même chose en utilisant un feuillet d'esri.

toute aide s'il vous plaît

Répondre

0

vous pouvez trouver un exemple en direct esri-brochure que les styles Fontionnalités utilisant L.icon ici: http://esri.github.io/esri-leaflet/examples/styling-feature-layer-points.html

L.esri.featureLayer({ 
    url: 'https://services.arcgis.com/rOo16HdIMeOBI4Mb/arcgis/rest/services/Trimet_Transit_Stops/FeatureServer/0', 
    pointToLayer: function (geojson, latlng) { 
    return L.marker(latlng, { 
     icon: L.icon({ 
     iconUrl: 'https://esri.github.io/esri-leaflet/img/bus-stop-north.png' 
     }) 
    }); 
    }, 
}).addTo(map);