Help:Handling lines with Maps or SemanticMaps

Jump to: navigation, search

Semantic extension(s): Semantic Maps

Further extension(s): Maps

Keyword(s): maps, routes, lines, coordinates



I encountered a problem while I was trying to display lines on a SemanticMaps (eg: with multiple points like 59.9699756,5.7331073:60.3912628,5.3220544:60.3872241,6.343943).

SemanticMaps doesn't support this feature yet/anymore. (cf Issue on GitHub)



How to

Create a Template:Route

This uses the Semantic Internal Objects extension {{#set_internal}}

|Mapdata={{{2}}}~{{{1}}}~ ~#156BB4
All the routes are Blue like #156BB4
== Usage ==
== Rendering ==


Insert your route in a page

In the page you want a route, you insert this : (Rouen and Paris are 2 cities in France)

Create your map

Where you want your map, insert a simple map from the Maps extensions (not Semantic Maps)

{{#display_map: <!-- here you can add points if you want -->
{{#ask:  [[Route::+]] |?Mapdata= |mainlabel=- |format=list |sep=; |limit=200}}

And you're good to go !

Extra tips for free

Create a detailed route with precise points

To find out the detailed coordinates of your Route, I suggest you use the OSRM - Open Source Routing Machine.

Once you created your track, you can export it as a GPX file.

Simplify your tracks

With your full GPX track, you can use the GPX Simplify Optimizer which is a great tool to visualize, simplify or export your GPX file in different formats.

It will allow you to simplify the GPX tracks so there is less points, and export it in Mediawiki format like A,B:C,D:E,F etc... It works perfectly in Semantics Mediawiki with hundreds of points. (I didn't test it with more yet)

Hope this can help.