📜 ⬆️ ⬇️

Offline Maps / Android Navigation

OsmAnd screenshot
In this article I want to talk about how creating a bright, kind, eternal opensource application, you can not only increase your karma, but also earn some money.

Just over a year ago, I had an Android phone and immediately the question arose before me what to use for traveling, navigation. Anyway, but a phone with GPS and the Internet is very convenient, especially in unfamiliar places. After reviewing all the then existing applications, I was a little disappointed. One does not work without the Internet, the other does not support navigation, the third does not search for POI, the fourth does not have vector maps, etc. There were, of course, free commercial analogues, but some have let the cards down, others have feedback, but still, when you pay, you want to get something, for which you pay.
It should be noted that in search of applications, he opened a completely wonderful project OpenStreetMap with excellent detail for Belarus. Therefore, having collected all the forces and the desire to do something free, affordable and necessary, the OsmAnd project was opened on googlecode.


Start


First of all, when you start a project, you need to decide why you start it. Most opensource projects begin for themselves and for personal purposes. In principle, this one was no exception: I didn’t have enough offline navigation, or at least navigation through offline maps. Secondly, it is necessary to look at the existing analogues: as I said, I didn’t want to buy anything (it wasn’t worth it), but Navit didn’t come in from free and free. The most difficult thing was to decide on such a voluminous project: navigators are written by large companies and they all work differently, for someone it is good, and for someone it is not very good. As it turned out later, it was not for nothing that he was afraid: there are very complex algorithms in navigation applications.
')

First version

OsmAnd icon
With the choice of methodology, there were no problems at all: Agile recently fashionable. There is time - I work, I am interested - I do, I want - I communicate with users. As many write, you need to start with something working, performing the main function. Therefore, made the display, download raster maps and display POI. What does this have to do with navigation? But that was only the beginning.

In general, creating an application for myself, I noted that sometimes I use maps not only for navigation, so at the very beginning I added selected points, search for vehicles, animated transitions between points and slide effects, in general everything that took a little time, but added some positive effect. Having met a lot of support for the OSM community, I definitely decided that the application should help improve OSM maps, so I added OSM functionality to the bugs, editing the POI directly from Android and recording tracks.

The first version, a month later, turned out to be quite fun: she knew how to display raster maps, like all similar ones, and do a bunch of additional things using offline data, search by address, search for transport, search for POI. This application can be used for specific tasks, but by itself it was devoid of structure - it was difficult to understand what it can and what does not. These are just the disadvantages of Agile - at every stage create maximum business value in a short time. The solution was only one - refactoring.

First publication

OsmAnd main screen screenshot
Honestly, the application was advertised in narrow circles of the OSM community (on the Android OSM Wiki ), nothing was specifically conducted. That is why, placing on the Android Market, it was difficult to expect a large number of downloads. But I rejoiced in almost every one of them, feeling proud that I was doing something useful - I received a special feeling of satisfaction from positive comments. Somewhere in 3 months the number of downloads reached 1000 and I seriously thought that the project had become famous and (!) It would not be so easy to quit. It should be noted that all this time he was very attentive to criticism and corrected errors, added functions in a matter of days. Unfortunately, (some!) People who download applications through the Market cannot understand the essence of opensource, flexibility, and they don’t read the description of the application at all, that it doesn’t know something. What else can explain the assignment of a 1-star rating for the fact that there is no two-finger zoom or does not start at all? Even then, the application had 40% of functions that 90% of users did not use, for example, loading maps on Android from WMS layers. Specifically, the OsmAnd problem was that the map data should be prepared (POI, Address), and for this you need to run the OsmAndMapCreator desktop application. At first, I didn’t even think about hosting, it's open source, for free, what else is needed , prepare the data and use it. Of course, I understood how uncomfortable it is, but let the project develop, help, and not put a minus. At the same time, I even thought about removing OsmAnd from the market. In general, it was the wrong marketing move - to publish on the market is not quite thoughtful product, but really wanted to. Therefore, it is still possible to find information on the Internet that something is not working, although everything has long been redone.

Project development

OsmAnd routing screenshot
Many people say that the beginning of the project is the most difficult, you have nothing, and you need to get something working - I will allow you to disagree. In the beginning, you have an idea and a belief that it is working. The most difficult thing, I think, is the end of the project - to leave is beautiful. He did not come to me, but I can imagine: it will be necessary to find people to whom to transfer, to prepare documentation, etc. Even the middle is much more complicated than the beginning, because the forces are running out, the amount of time for adding functions grows, technical debt is also, ambiguity of goals, and it just bothers you ...

Only one thing saved me, I myself used the application and could not forgive myself why it worked so crookedly . And I used voice navigation in Belarus, almost everywhere, although it demanded the Internet, but it worked. Correcting all the absurdities and shifting the functions from the menu to A to B, every project accumulates fairly large features that allow you to bring the product to a new stage, but oh, how difficult it is to undertake them (especially if no one forces). One such feature was vector rendering. The advantages for the application are obvious: the relatively small size of the maps, the ability to manipulate layers, rendering, receiving information directly from the maps. But from the point of view of development, this is a rather difficult task: implementation in the forehead did not work out in a certain way, it was too slow. I had to type in the books to ask Google and find a way to store RTree, and to put all the data into your binary format so that it could be read from the disk faster. Still, having invested hundreds of hours of development, it should be recognized that it is slow. Especially for my old HTC Hero in a country like the Netherlands (osm pbf> 450 MB). Well, the implementation of offline routing is still in a deep endeavor. I did not build illusions that it would be easy to realize, but I didn’t assume that the difficulties can be not only technical, but also creative.

Community

OsmAnd main screen screenshot
Sooner or later, creating a popular opensource project, you will have a community. He must be very loving, but not pleased in everything, and the most important thing is to precisely determine people who may be useful in the future. Regarding OsmAnd, the community, of course, exists and 5-6 people are very actively involved in mailing sheets, create bugs, comment on them, create offline data. But (!) Is still 98% of the code, written by one person. So, as it was rightly noticed, opensource projects are first of all an initiative of one person. It seems to me that getting sick of an idea is much easier than infecting (well, only if it’s not bad).

Monetization


Probably, many have not read it already, but have added to this tasty morsel. The donate button existed on the site for a long time, but did not make enough money to motivate the development. Most likely, she expressed the love or compassion of individuals for this product. Then the BidForFix button appeared , that is, users place bets on some features, and when the feature is ready (assumed), the programmer gets a reward as these bets. As far as I saw the bets were made a lot, but none of them worked. Most users bet on offline routing, which is still under development, but the amount there is relatively small - navigation is estimated at about $ 200-250 - I would give $ 500 to someone who does.

The source code of the project has exceeded 30,000 lines (this is very approximate) and the number of problems became much more than the desire to correct them. Fortunately, someone suggested a brilliant idea - to sell! A little paraphrasing it, it turned out like this: everyone who wants to receive fresh updates from Market should donate 3 euro, who don’t have this money, can download the same free version, but from the site. It is not strange, the idea works, people buy the version and enthusiasm is back.

current position

OsmAnd Yandex traffic screenshot
OsmAnd still has a main goal - to make opensource navigation at the level of commercial and better! Already, OsmAnd is perfect for pedestrian, bicycle navigation and has quite unique features, such as GPX file navigation. Of course, the application is not without problems - I think that more than half of users do not know how to use it most effectively, but work is underway to improve usability and the development of new functions. In general, the future depends on you and on us. If you have questions about the application or a desire to participate - write.

Interesting facts about OsmAnd

Source: https://habr.com/ru/post/120248/


All Articles