ynunokawa / L.esri.WebMap

A leaflet plugin to display ArcGIS Web Map.
MIT License
22 stars 21 forks source link

Can we view non-public maps? #76

Open trifroggy opened 7 years ago

trifroggy commented 7 years ago

The plugin works great as it is but I'm trying to see if it can also be used to view a non-public map. For example, one that you create for a group. When I just pass an ID I get (as expected) message: "You do not have permissions to access this resource or perform this operation." messageCode : "GWM_0003"

Is there a way to pass a token as well to access the resource?

Thank you! Gregory

jgravois commented 7 years ago

as mentioned in the CHANGELOG, support for private webmaps was added in v0.3.4

var webmap = L.esri.webMap(webmapId, {
    map: L.map("map"),
    token: 'abc123...'
});

test/arcgis-online-auth.html is an example which utilizes OAuth to allow end users to sign in with their own credentials.