The 401 error is because you are trying to access a restricted document. Use getDocumentUrl() method and that will get the file URL with an auth token.
var icon = client.getDocumentUrl(“docs/dot.png”);
Then reference the icon in your marker “icon:icon,” and you should be all set.
https://dev.vantiq.com/docs/system/cbref/index.html#getdocumenturl
Viewing 2 posts - 1 through 2 (of 2 total)
- You must be logged in to reply to this topic.
We re trying to display an icon in the map shown below in the code but we are not being able to do it.
Is there any other way to display the icon in the map?
var marker = new google.maps.Marker({
position: myLatLng,
map: map,
icon:”docs/dot (11).png”,
title: PoleID
});
The error I am getting
Failed to load the resource:the server responded with a status of dot.png:1 401()