Upload or update weekly records

Hi,

I have build: BVB Worldmap by nicovadoy · MapHub which is a map around information about a football club.
For that I would like to build a new feature, why I can show for each matchday, where the matches of the club are shown for each country.
The information I want to display is something like this:
Austria: Sky Sport Bundesliga 1, Sky Go [Sat, 16.Jan.2021 15:30]

The issue is, that these countries and stations change from match to match. I can build a spreadsheet that contains all the code for the new matchday, but I am uncertain about some parts of the GeoJSON.

Idealy what I want is to download the current GeoJSON file from the map, paste my code for the current matchday, right below it, save the file and upload it again.

But I don’t think I can add it to the end of the file, can I?

here is how a new record could look like
{"type": "Feature", "id": 2143095766, "geometry": {"type": "Point", "coordinates": [-64.967282, -34.996496]}, "properties": {"title": "Argentina BVB vs Mainz", "description": "- Argentina: OneFootball App ^Sat, 16.Jan.2021 11:30", "group": 759738657, "marker-symbol": "cinema"}}],

questions:

  • id , is that a random ID, if I create new records, I don’t know these before. Do I need to?

To make it even easier, would it be possible to upload 2 files to the map? Would they overwrite or add after each other?

if you have any other suggestion on how to do this, please let me know.
I created a testing ground table here: https://maphub.net/nicovadoy/testingground

Arg, I saw already an error.
The first "Feature part is from another object. So I only need this:
{"type": "Point", "coordinates": [-64.967282, -34.996496]}, "properties": {"title": "Argentina BVB vs Mainz", "description": "- Argentina: OneFootball App ^Sat, 16.Jan.2021 11:30", "group": 759738657, "marker-symbol": "cinema"}}],

Hi Nico,

MapHub has an (currently very limited) API which allows you do to things by programming. Do you have some basic Python knowledge? Here is a small example about how to use the API: Append map · GitBook

For the random ID, you can generate any random number, but you can leave it empty.

I hope the API works for you, if it doesn’t, please share it here.

Zsolt

1 Like

I think it could be possible to just create the matchday records and upload this one separately into the map. These items will be placed at the bottom and I could just move them by drag and drop and remove easily / delete these records, once the matchday is over. I will test a bit around.

Now they’ll be added at the bottom, and then you and move them around. If you want 100% customization, it’ll be possible with the “replace_map” endpoint.