Add a way to export and import JSON data in the map editor.
Hello,
I was initially going to suggest this in my thread about the problem of the slow map editor with large maps, but decided to make its own suggestion thread because I realized it can really be a game changer for map editor users. So the idea is very simple:
Add a way to export and import JSON data in the map editor.
Why?
Currently, map creators can use the API to load the JSON data that list the locations. It's simple to do: just use the following link:
https://geoguessr.com/api/v3/profiles/maps/MAP_ID (replacing MAP_ID by the id of the map that can be collected in the end of the URL (ex: 59a1514f17631e74145b6f47 is the map ID of https://geoguessr.com/maps/59a1514f17631e74145b6f47).
This will only work if you're logged in and if the map was made by you (you can't load other user's map data, which would spoil locations). It will display the map data, including the details like the date of creation, map boundaries used to calculate scores and of course the whole list of locations (or polygon coordinates for polygon maps). Useful to count the exact amount of locations of a map and make manual backups just in case.
Problem is that the API isn't supposed to be used by us as you said it's more a dev tool, it can change anytime depending of your needs, and it's not user-friendly at all. And of course there is no way to import a JSON in the map editor with it.
But having an actual way to export and — most of all — import JSON data would be a very useful tool. Not only being able to export / import JSON data would allow us to make backups that we can restore ourselves (remember your system already had failures, removing locations randomly from our maps), but that would also let us use an external tool to generate maps (similar to geosettr (which recently closed due to Google API changes) or geogenerator.fr for the retro version of Geoguessr) or just edit ourselves the locations manually.
Why would this be useful? Mostly because of the slowness of the map editor. As I said, the map editor suffers of a major issue with large maps that have thousands of locations. Since you said it would be lot of work and a major rework to fix this issue, it is better to find another solution and an import / export tool can totally be one! We could generate maps using external tools (tools that we can create on our side), which could include hundreds of thousands locations, without having to suffer the slowness of the editor. Or we can just create a new empty map, add more locations with a fast editor, export the resulting JSON and merge it to the main map JSON, to finally import the new data into the main map on Geoguessr.
So many possibilities with just a simple loader... Because I don't think creating this would be hard. Exporting data is already here (just add a way to export and save in a file, more friendly-user than the API), and importing data would probably work in a similar way than saving a map. Of course it will need some security check to avoid importing bad or dangerous data, this is why I would suggest to enable data import only for pro users that have completed the trial and paid the first month (because creating a free trial account with fake bank data can be easy I guess).
How this would work? I can imagine a new set of buttons in the map editor: Import and Export. Just click on import, select the JSON file and the editor will load the locations found in it (or deny the file if data is incorrect). Clicking export would just download the JSON file (like you download any file on the web). I also think it would be mandatory to have those buttons outside of the editor as well since it could take forever and laggy to load a map that contains hundreds of thousands pins, which can be possible by generating maps with external tools like I said. Without that, we can be able to stuck a map without being able to load it and make modifications. To be honest, when a map is above a certain amount of locations (like 50.000 or 100.000), the map editor should not be able to load it and try to display a map with all the pins, because no computer would be able to handle that. The largest custom maps I know have a bit more than 20.000 locations and can be opened slowly, so above 50.000 can already be too much... Just having the import / export button on the map description page and our map list will be enough for this case.
And what about invalid coordinates that are outside of Streetview data? Well, this will just result into black screens in the game. It's up to users to check their data, so I suggest you to add a warning screen when using the import tool and make the user agree that it will be responsible for data errors and that Geoguessr is not going to be in cause. Adding another warning for players that are going to start a game using a map that was imported via this tool may also be important, to inform them about the risk (so they know it's not from Geoguessr but from other users). That would be the downside of this suggestion, but it's still worth the risk in my opinion.
In the end, what this tool will do?
• Export: it will save the full JSON file like the API currently does, under a .json file
• Import: it will check the JSON and only import the locations (everything listed in the customCoordinates category), adding them to the existing locations database if the import is done on an existing map. I only suggest importing locations and nothing more as it can be easy to break important data like the boundaries, the map ID, the map details etc. Only locations are important. This mean a JSON that only has locations stored in a customCoordinates category can totally be imported as well. And if the map is new, the user will have to provide title / description and select the pictures to complete its creation. The rest (boundaries, map details...) will be handled by Geoguessr like when a new map is created in the editor. Of course, if the map is a polygon map, then polygon coordinates will be expected instead of location coordinates.
I really want to say again: being able to import data in an existing map is really important. Without that, this idea simply loses all interest as it will require to create a new map, losing all the statistics of the original map.
I hope you can create this, like I said it shouldn't be too much work when it will give so many benefits to the map editor. Thank you for reading.
I was initially going to suggest this in my thread about the problem of the slow map editor with large maps, but decided to make its own suggestion thread because I realized it can really be a game changer for map editor users. So the idea is very simple:
Add a way to export and import JSON data in the map editor.
Why?
Currently, map creators can use the API to load the JSON data that list the locations. It's simple to do: just use the following link:
https://geoguessr.com/api/v3/profiles/maps/MAP_ID (replacing MAP_ID by the id of the map that can be collected in the end of the URL (ex: 59a1514f17631e74145b6f47 is the map ID of https://geoguessr.com/maps/59a1514f17631e74145b6f47).
This will only work if you're logged in and if the map was made by you (you can't load other user's map data, which would spoil locations). It will display the map data, including the details like the date of creation, map boundaries used to calculate scores and of course the whole list of locations (or polygon coordinates for polygon maps). Useful to count the exact amount of locations of a map and make manual backups just in case.
Problem is that the API isn't supposed to be used by us as you said it's more a dev tool, it can change anytime depending of your needs, and it's not user-friendly at all. And of course there is no way to import a JSON in the map editor with it.
But having an actual way to export and — most of all — import JSON data would be a very useful tool. Not only being able to export / import JSON data would allow us to make backups that we can restore ourselves (remember your system already had failures, removing locations randomly from our maps), but that would also let us use an external tool to generate maps (similar to geosettr (which recently closed due to Google API changes) or geogenerator.fr for the retro version of Geoguessr) or just edit ourselves the locations manually.
Why would this be useful? Mostly because of the slowness of the map editor. As I said, the map editor suffers of a major issue with large maps that have thousands of locations. Since you said it would be lot of work and a major rework to fix this issue, it is better to find another solution and an import / export tool can totally be one! We could generate maps using external tools (tools that we can create on our side), which could include hundreds of thousands locations, without having to suffer the slowness of the editor. Or we can just create a new empty map, add more locations with a fast editor, export the resulting JSON and merge it to the main map JSON, to finally import the new data into the main map on Geoguessr.
So many possibilities with just a simple loader... Because I don't think creating this would be hard. Exporting data is already here (just add a way to export and save in a file, more friendly-user than the API), and importing data would probably work in a similar way than saving a map. Of course it will need some security check to avoid importing bad or dangerous data, this is why I would suggest to enable data import only for pro users that have completed the trial and paid the first month (because creating a free trial account with fake bank data can be easy I guess).
How this would work? I can imagine a new set of buttons in the map editor: Import and Export. Just click on import, select the JSON file and the editor will load the locations found in it (or deny the file if data is incorrect). Clicking export would just download the JSON file (like you download any file on the web). I also think it would be mandatory to have those buttons outside of the editor as well since it could take forever and laggy to load a map that contains hundreds of thousands pins, which can be possible by generating maps with external tools like I said. Without that, we can be able to stuck a map without being able to load it and make modifications. To be honest, when a map is above a certain amount of locations (like 50.000 or 100.000), the map editor should not be able to load it and try to display a map with all the pins, because no computer would be able to handle that. The largest custom maps I know have a bit more than 20.000 locations and can be opened slowly, so above 50.000 can already be too much... Just having the import / export button on the map description page and our map list will be enough for this case.
And what about invalid coordinates that are outside of Streetview data? Well, this will just result into black screens in the game. It's up to users to check their data, so I suggest you to add a warning screen when using the import tool and make the user agree that it will be responsible for data errors and that Geoguessr is not going to be in cause. Adding another warning for players that are going to start a game using a map that was imported via this tool may also be important, to inform them about the risk (so they know it's not from Geoguessr but from other users). That would be the downside of this suggestion, but it's still worth the risk in my opinion.
In the end, what this tool will do?
• Export: it will save the full JSON file like the API currently does, under a .json file
• Import: it will check the JSON and only import the locations (everything listed in the customCoordinates category), adding them to the existing locations database if the import is done on an existing map. I only suggest importing locations and nothing more as it can be easy to break important data like the boundaries, the map ID, the map details etc. Only locations are important. This mean a JSON that only has locations stored in a customCoordinates category can totally be imported as well. And if the map is new, the user will have to provide title / description and select the pictures to complete its creation. The rest (boundaries, map details...) will be handled by Geoguessr like when a new map is created in the editor. Of course, if the map is a polygon map, then polygon coordinates will be expected instead of location coordinates.
I really want to say again: being able to import data in an existing map is really important. Without that, this idea simply loses all interest as it will require to create a new map, losing all the statistics of the original map.
I hope you can create this, like I said it shouldn't be too much work when it will give so many benefits to the map editor. Thank you for reading.
Follow this post
26
followers
But Diverse World is a seriously good map on GeoGuessr - my favourite - so any suggestions from its creator should be taken seriously.
• incremental: new data is added to existing data, increasing the location count
• replace: existing data is wiped and replaced by the new data
It can be better in some cases to just replace everything as the user can work with his own file locally and then just push the new version on Geoguessr, instead of creating new files every time he wants to add locations. Also it will be needed when removing or editing existing data.
Can you at least give your opinion about this functionality? To know if it is possible to do (I don't see why it wouldn't but we never know)? Myself and many others really wait for this to expand the custom maps beyond the current limits.
Also reminded that we still don't have a "delete map" functionality.
Thanks.
Best,
To be honest I already found another way to import my coordinates few months ago (using Postman to send custom POST requests) so I won't need it but for other map makers it will surely be very useful as it's more user-friendly. I tested it, it's working. Seems like there is no way to send pitch, zoom and heading along with lng and lat, maybe I missed something or it is just not implemented yet.
There is another issue, which is not related to the import tool but we can hit easily the limit of locations that can be sent to the server, because of the weight of the POST request data (which is around 4Mb, corresponding to something like 55k+ locations). Recently, someone already hit this hard limit just by placing hand picked locations before and could't add more locations. Do you think it is possible to increase the limit of the POST request? Pushing it to 10Mb would allow 100k+ maps, which is probably more than enough.
I also found that trying to send more than 198750 locations will throw an error:
{ "message": "A write operation resulted in an error.\r\n Resulting document after update is larger than 16777216A bulk write operation resulted in one or more errors.\r\n Resulting document after update is larger than 16777216", "statusCode": 500 }
To achieve this, I had to send locations with very low precision (basically coordinates looking like "1.0"), meaning it's unplayable but it was just to test the limits. Just wanted you to know about this in case of.
Best,
You need to be logged in and be the creator of the map to get the data.
@Erland Thanks. You can go above 10Mb if you feel like it's safe but because of the other error I get when sending almost 200k locations I guess it's risky to go above. Except if the error can be fixed as well so we can go higher than 200k locations.
Been able to export and import from GeoGuessr itself would be the best way IMO as we can work in separate maps to avoid lag on maps with many pins, and then add the new locations to the main map, and never publish the temporary one.