COMPARISON OF JAVASCRIPT LIBRARIES FOR WEB-CARTOGRAPHY

Due to the active development of web-cartography


Introduction
Today, due to the evolution and involvement of the Internet in every person's life, so-called libraries for presenting cartographic information gained much popularity, allowing you to use the web browser for displaying a map with labels, routes and other spatial data.This can be done using independent resources that allow you to store data and display information on the map.The most famous of them are Yandex.Maps, Google Maps, OpenLayers and Leaflet.This list is not exhaustive, since there are many other analogues, such as Bing maps, Maps.me, 2GIS and many others, but in this article we will limit ourselves to only those listed above.
With such a large number of products with similar functions, it is important to understand their similarity and difference, and also to decide which tasks they are able to execute.Attempts to perform the analysis are done repeatedly, there are entire websites devoted to this issue, like http://mmaps.net/and http://mc.bbbike.org/(Fig. 1), which on one page display data simultaneously from various sources in different versions.However such analysis tools, as well as articles [1,2], usually examine only the coverage of the territory and the completeness of the cartographic material, rather than the functionality provided by the library, which ultimately does not allow you to unequivocally determine the choice.There are also many articles aimed at analyzing the capabilities of a particular library or service [3], there are even articles aimed at comparing "similar" libraries [4], but they do not always determine in what scenario to use one or another.

Fig. 1. Map Comparison Interface
Google Maps API is a cartographic library developed by Google.Unlike the previous two it is distributed under more stringent conditions.It has its own audience, mainly because it is less demanding to the developer's knowledge in the field of geographic information systems (or spatial information).It allows users to display the fully functional map by following a few simple steps.Ultimately, it does not allow you to display complex structured information and information from external sources.
Yandex.Maps API is in a way an analog of Google product.In many respects it repeats its functionality and idea, but it has larger content in the Russia.Therefore this library is more often used in Russia.

Problem statement and requirements definition
For the system end-user, the most important component is directly the map interface.Is it the main working element of any geographic information system.It allows you to perform basic data mapping functions:  display map layers with the possibility of switching them;  control the scale of map;  determine coordinates of mouse, click or object.
As well as basic functionality more special functions should be executed:  object search (by coordinates or semantic characteristics);  displaying information about the selected object;  making measurements on the map (measuring length, perimeter and area);  adding objects to the map;  layer transparency controlling;  layer grouping.Thus, the choice of means for visualizing data on the client side is the key point in creating the whole system.Since in the field of geographic information systems it is customary to distinguish two types of spatial information: raster and vector data, the selected component must support displaying both of them.In addition, there should be algorithms optimizing the download of data, such as:  partly map download using tiles;  generalization;  splinting the query into several parts.Besides there should be the possibility of connecting data from external sources using OGC services -WMS, WFS, WMTS and support of modern formats for storing spatial information -KML, GML, ESRI ShapeFile.
To determine the most appropriate means of spatial data visualization on the client side, all the libraries presented above were analyzed according to the following criteria: 1) The size of the library; 2) Functionality; 3) Basic maps accessibility; 4) External layers support;

Conclusion
The carried analysis allows you to determine which of the libraries is suitable for using in a particular scenario.Obviously, there are two groups which elements are similar in a number of criteria.The first group includes OpenLayers and Leaflet, the second -Google Maps and Yandex.Maps.Obviously, due to their limitations, the last two can't be used in a number of projects, for example, in a closed system such as municipal geoportal.In addition to closed source code, it is not always possible to adapt the system to its own needs, which is also exacerbated by the lack of WMS and WFS services support.Without such support it is difficult to build a multifunctional monitoring system or geoportal.However, this libraries suitable for presentation of small data sets, for example, the location of stores in a network.These products act as ready-made solutions, which allows you to host a map on your web-site without attracting additional resources.
Using libraries of the first group, on the other hand, allows to solve more complex problems.Not only a broader functionality can be noted, but also higher requirements to the developer.Thus, when creating a large web-mapping service, it is worthwhile to use one of the libraries from the first group.If you choose one of them, then in general, the analysis allows you to say that there are no fundamental differences of absence among them.However OpenLayers has much faster growth speed and a wider community, so you can count on longer support.Benefits of Leaflet include module structure and expansion via plugins which allow developers to choose only necessary functionality and optimize website page loading.