L.esri.WebMap icon indicating copy to clipboard operation
L.esri.WebMap copied to clipboard

Can we view non-public maps?

Open trifroggy opened this issue 7 years ago • 1 comments

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

trifroggy avatar Jun 23 '17 10:06 trifroggy

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.

jgravois avatar Jul 03 '17 17:07 jgravois