sobota 15. července 2017

Franklin expedition map – editing and adding objects

In the previous article, we have shown the functioning of the web map application showing locations associated with the Franklin Expedition. In addition, we have explained the breakdown of our own "Franklin" map content into map layers and categories. In this article, we'll show how we can edit existing objects and add new objects to the map. There is a relatively long introduction – in the author's opinion it is necessary... :-)

Why is this and that missing?

Every map user, at least frankly familiar with the Franklin expedition, will very soon ask questions like: Why is not that site on the map? Why is this crucial link missing at this object? Why is missing a description for another object?
The answer is simple: the content of the map is just a sample. In the map (more precisely, in the database from which the data about objects are read) were placed objects for which more or less accurate coordinates could be quickly found. Simultaneously, it was necessary to demonstrate examples of different object categories (see the explanation in the previous article) and to place at least one object in each map layer (see the previous article again).

OK, but when is the proper content going to be there?

It depends mainly on you, dear users. :-) The development of the map would be, if it should be done in professional way, full-time work. Programming in the evenings and weekends is of course much more slower and there is not much time left to add new objects to the map and improve descriptions of already added objects.
Look on the bright side: any user (no special computer knowledge required!) can modify existing objects and add new ones now. Every contribution is welcomed!

Cannot the whole map suddenly disappear?

The potential contributor to the map can ask a proper question: and cannot one day a) the whole map disappear from the web, b) its author as well c) and my work will come to nothing? Very good question, indeed!
On a) and b) the answer is yes, it can, very easily. Nobody knows his/her future.
Point c) is fortunately solvable by technical means. As far as the source code of the map is concerned, I plan to make it publicly available this year (experienced users can even now download the necessary files, except for the PHP scripts needed to send emails). Concerning data (that is more important than a map application as such): a complete listing of all objects from the GeoJSON database is available at https://com.franklinova-expedice.com/db/readfranklin.php. In the future, I plan to make available a complete dump of database in SQL format.

Finally, editing and adding objects

Let's finish general introductions and promises. To add new objects, click the "+" icon at the top right of the map window. To edit existing objects, click the "Edit" button at the bottom right of the information window (see the first image in the previous article). Adding new objects is basically the same editing existing ones, except that we must first draw a new object on the map.

Draw a new object on the map

You can add points (most of the cases), lines (polylines, such as routes) and areas. When placing a new object on the map, we first select the appropriate geometry for the object and then draw it on the map. In the case of a line and an area, the drawing ends with a double click. In the case of a point, an information window is displayed immediately after its location; in the case of a line and a surface, it is necessary to click on the newly drawn object. The next part is already the same as editing an existing object, see next paragraph.
Choosing geometry of a new object
Choosing geometry of a new object

Editing an existing object

When you click on the "Edit" button in the info window, an edit form will display. You can edit the name of the object, its description and add up to two related links to other websites. Then you must fill in your email and name/nickname (you can be contacted in case of additional queries) and you can attach additional comments or explanations.
So far, you cannot specify the category of the object, the map layer to which it is intended, and attach a photo (but of course you can write your remarks concerning these topics in a comment field or send them by e-mail).
You can change the location of the existing object. Click and drag to edit point placement. The editing form will disappear during dragging to allow you to move the point anywhere on the map. You can move vertices of a polyline, too.
Editing form for existing object
Edit form for existing object

Submitting Changes

The most important step is to send your changes by pressing the "Send" button. On the other hand, if you press "Cancel", the content of the form will be erased and all your edits will be lost (only for the currently edited object, of course).

Important! No immediate changes in the map

Any changes you make to the map and send them will appear as "executed" until the browser window is closed. In fact the content of the map has not changed! Your changes have been sent by email, and they will be reviewed and then the database will be updated (it should be matter of days or in some special cases few weeks). You may also receive an e-mail message explaining why your change was not accepted (and of course you can protest! :-) ).
You may wonder why the changes are not written directly into the database. The main reason is that it is, in principle, impossible to prevent overwriting important data in the database (users can make mistakes or even try to damage data intentionally). Additionally, editing conflicts would have to be solved if two users edited the same object. But in the future (it is necessary to solve the technical "details" - e.g. registration) there could be "personal" map layers for interested users. "Finished" objects from these layers could then be moved to "official" layers.

Do not be afraid to experiment

Feel free to try map editing. Please mark your trial attempts as "TEST" and send it to see that it works. :-) I look forward to your cooperation.

Žádné komentáře:

Okomentovat