NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum

Hi all,

I started to play with umap and i must say that it feeds almost my needs and my co-workers's.

I wonder if there are some tools to create umap format from scratch ? I use php as script langage.

If not, do you think, it's possible to export as umap format then update the file (how?) then re-import the file in umap. By instance, what is the best practice if i want to change the background color of some polygons ? I don't want to and I can't use the remote-data functionnality because all my data can't be accessed from the internet.

It seems this same type of question has already been asked with no success: https://help.openstreetmap.org/questions/65319/umap-programmatically-updating-layer-content

Thank-you and regards,

fabrice.

asked 16 Oct '18, 14:18

Fabrice%20R%C3%A9gnier's gravatar image

Fabrice Régnier
10112
accept rate: 0%

Do you mean that you'd like your uMap to use data that you're storing locally? Kind of like using Leaflet.js but with PHP?

(17 Oct '18, 05:19) robinmetral

No, i don't mean this. I'd like to create umap files format from scratch with php langage. Then, i'd import these files in umap web interface.

I hope i'm clearer this time in my request ;)

By the way, this is what i started to do. A big php array with json_encode magic command. I could import the created file into umap we interface with success.

I guess, i could provide a small php library to allow others to deal with php and umap. I have to think harder ;)

(17 Oct '18, 09:42) Fabrice Régnier

Is the following working for you?

Create an example map, similar to the one you want.

Export the full data of the map (click on the share icon, in the right tab, in the lower part, titled Download data, select Full map data and press Download data).

To get a similar map, edit or create a new file, in the umap format, then use import data to upload your file

Use the saved example map as a template for the new one. I do not know it the syntax used in this format is somewhere available

permanent link

answered 26 Oct '18, 10:30

AnyFile's gravatar image

AnyFile
403
accept rate: 0%

Thank you AnyFile for your answer.

Yes, what you describe is merely what i've done to create maps from scratch:

Here are the steps:

  • I create a map manually with some objects on it that i want to play with
  • I export the full map on umap format.
  • I open the umap format file to see how it's written
  • I reproduce a such file (umap file format) with php and my own data from database
  • I import this umap file as a new map.

And i'm done.

I guess i should (could ? shall?) create a php library to make it easier for me and for others who want to create such maps...

regards,

f.

permanent link

answered 26 Oct '18, 10:44

Fabrice%20R%C3%A9gnier's gravatar image

Fabrice Régnier
10112
accept rate: 0%

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Question tags:

×314
×34
×1

question asked: 16 Oct '18, 14:18

question was seen: 2,573 times

last updated: 26 Oct '18, 10:44

NOTICE: help.openstreetmap.org is no longer in use from 1st March 2024. Please use the OpenStreetMap Community Forum