Can someone please provide clear, simple instructions for using the Mapillary REST API from MapillaryJS application to retrieve an imageID close to a coordinate?

Hello, I am pulling my hair out trying to build a MapillaryJS integration with the VertiGIS Studio Web (VSW) Viewer (a javascript-based web map viewer application), and have hit a wall trying to figure out how to get the imageID(s) for a specific coordinate. This is required so I can initialize the viewer at the correct location, and update the viewer to synchronize with the VSW map, using viewer.moveTo({imageID}).

All of the MapillaryJS examples have the imageID hard-coded, which, to me at least, is useless in a real-world scenario. I know the MapillaryJS 3x API had a viewer.moveCloseTo method that made this trivial, but that is gone in 4x, with some vague instructions to ā€œuse the Mapillary REST APIā€. The documentation for the Mapillary REST API assumes the reader understands both which endpoint to use, and how to construct the url.

Some actual examples, in the context of the MapillaryJS API, of taking a lat/lon coordinate and retrieving the imageID for the closest image, would be greatly appreciated.

To the Mapillary team: this should be on page 1 of the documentation. It shouldn’t be this difficult.

There is also the matter of CORS errors when hitting the REST endpoint, which a colleague of mine ran into three-and-a-half years ago. Hopefully this has been resolved, but there has been no update on that post…

1 Like

Thank you. I probably could have written that more clearly, but I meant exactly what you describe.
I have an HTML page with an embedded Mapillary JS viewer, and want know how to use the Mapillary API (the REST API) to retrieve the imageID at/near a specific lat/lon. This is needed to initialize the viewer, as well as update it when the user selects a different coordinate on the main map.
In the 3x version of Mapillary JS the Viewer object had a moveTo() method that did exactly this.

you are going to have a very difficult time in this line of business and you should probably look for doing something else.

Or you could encourage newcomers instead of scaring them away! :slight_smile: I’m not sure what this passive aggressive style of helping is, but please realise that not everyone on this forum has the experience you do, or the intellect. Both things can be developed. It’s sure frustrating if you’re a newbie and what you hear is to ā€œlook for something else because you’re inadequateā€ based on a singular post.

1 Like

Thanks for the support. The funny thing is I’ve been doing this for 30 years and over that time have learned countless APIs, SDKs, and platforms. I might not be the sharpest knife in the drawer like our hero, GITNE, but I’ve always managed.

LoL, I’ve been doing this for 30 years. I’m the first to admit my patience to learn new skills has decreased over those years, but the lack of clear documentation is frustrating.
Regardless of how amazingly brilliant you think you are, if you came up with that example in 5 minutes, you obviously have far more prior experience and knowledge of the API and concepts than someone new to it.

That’s completely fine, dude. Don’t let someone else decide your worth and how you wanna spend your life. I enjoy building and solving interesting issues, and I am not afraid of looking stupid in the process, all I care about is the outcome. I’m relatively new to coding with APIs and external frameworks, so I have silly questions too. So what? The community is supposed to be welcoming and helping, not providing baseless unsolicited advice in an aggresive way, lol. It’s alright though, that’s how some people get their fix.

1 Like

Care to elaborate on this divine ā€œmethodologyā€ you talk about that you’re supposed to pop out of your mother with and which cannot be built via practice and experience?

1 Like