for your needs
Use OsmAnd API
OsmAnd API allows you to control the installed OsmAnd app. Starting development via the API is easy and straightforward and can be embedded in any application, without licensing requirements of the target app. The only drawback is that the user should have OsmAnd installed
OsmAnd API features:
- Adding favorites and markers to the map
- Navigation between locations
- Creating audio, video and photo notes
- Starting and stopping GPX track recording
- Importing GPX tracks into OsmAnd and navigatin along them
- Many other features are already present or can be implemented by request
Create new rendering style
Creating new rendering style is possible without any change in the program. Style definitions could be difficult if you want to write it from scratch for example Nautical style or Default style (15K lines of code). It is advised to create a dependent style so you could change start changing style by small pieces. For example UniRS style contains mostly color redefinition and icon appearance.
To test rendering style you could use OsmAndMapCreator. In case you would like to use in the OsmAnd on device. You need to put the xml definition of the style into folder on sdcard ('rendering') next to other rendering styles.
All rights on the style is created belongs to the author. Though these rights could not be applied to the OsmAnd binaries and .
Customize routing engine
In some cases you might want to extend or adjust routing experience of OsmAnd, so you could add extra parameters, add extra barriers or change some penalties. Please take a look at routing.xml. OsmAnd routing is using 2 directional A* algorithm based on fastest time (= distance/(speed*priority) + penalties) . It is a pretty easy format. It is divided into 7 sections (evaluation groups):
- access (1 allow, -1 not allow)
- speed (number that presents speed in kmh)
- priority (number between 0 and 1) - a multiplier to the speed and it is still bound to maxSpeed, so minimum(speed * multiplier, maxSpeed) will be used for A*
- oneway (1, -1 or 0) - used to clarify access based on direction of the movement
- penalty_transition (penalty in seconds) - used to define penalty when user goes from high class road to low class road. For example, motorway - 10, trunk - 15, if user goes from motorway to trunk penalty will be 5 seconds (=10 - 15). This penalty will be used by A* algorithm. There is no penalty if user goes from motorway to trunk and there is no penalty if route continues from motorway to motorway.
- obstacle (penalty in seconds) - defines penalty which is to the routing time
- obstacle_time (penalty in seconds) - defines penalty which is displayed to the user but it is not considered by routing engine i.e. obstacle_time - 2 hours, obstacle - 1 minute, on the shortest route engine will find a route using 1 minute obstacle but user will see that route time is 2 hours.
In order to test routing.xml you could use OsmAndMapCreator. To test routing.xml on a device, you could just replace default routing.xml in the root OsmAnd folder on the sdcard.
Contact us for development
In case you have are not sure which case fits you the most or you would like to ask help from developers who has experience in building application integrated with OsmAnd, please don't hesitate to contact us email@example.com!