May 3, 2021
Posted by Patrick Burma

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.



© Vantiq 2024 All rights reserved  •  Vantiq Corporation’s Privacy Policy and Cookie Policy