v1/geolocation/create - help needed

Started by axel.hennig, January 05, 2023, 06:35:55 PM

Previous topic - Next topic

axel.hennig

Hello everybody,

maybe someone can help me.

Don't know what I'm doing wrong, but I can't get it to work. I try to create a location using the 'v1/geolocation/create' endpoint.

My code (within a small app) looks as follows:
IMWS.post('v1/geolocation/create',{
    name: 'test 002',
    maptype: 'none',
    lat: 50.1234,
    lng: 10.1234
});

But it does just nothing and there is also no warning/error message when I run this in Chrome (DevTools).

Can someone point me in the right direction? Thanks.

Mario

What status code does IMWS return?
Did you check the log file (log file) afterwards for warnings and/or errors?

As per the IMWS documentation, the mandatory maptype parameter only supports the value radius. You specify none instead. Why? Maybe this is the issue?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

axel.hennig

Checked the log-file and no warnings or errors ("W>" / "E>") related to this (only one warning: Cannot find a dictionary for language 'en' or failed to load.)

Status Code of IMWS: Do not exactly know how to find out. In Chrome DevTools there is in the Console no error or something else. Just the two "console.log" statements that I put.

I've entered as maptype "none" because that was what IMWS returned from the "v1/geolocation" endpoint, but I've also tried "radius" with "mapradius: 50" and it didn't work.

Is maptype "none" missing in the documentation? Because the "v1/geolocation" endpoints returns this for some of my locations.

Mario

I have no idea. Did not work on this endpoint for years and I don't have the details in memory anymore.
If you consider this to be a bug, please open a bug report so I have a ticket I can use to schedule time for this.

Creating a location is so comfortable in the editor in IMatch, why do you need to do this via an app?

QuoteStatus Code of IMWS: Do not exactly know how to find out.

You see the status code when you look at  your request in the DevTools and check the response. 200 OK means no error.

QuoteIs maptype "none" missing in the documentation? Because the "v1/geolocation" endpoints returns this for some of my locations.
What makes these locations different than others. Which settings did you use differently?
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

axel.hennig

Quote from: Mario on January 05, 2023, 09:49:06 PMCreating a location is so comfortable in the editor in IMatch, why do you need to do this via an app?
Because I'm using a second test-database and I want to test some specific GPS-things and therefore I need the exact same locations as in my main-DB (and there I've got maybe 20 to 25 and I thought it might be quicker with an app).

Don't know why, but now it works -> restarted IMatch. So no bug, problem solved, thanks Mario as always for your help.