docs:faq:how_to:generated_waypoint_icon

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
docs:faq:how_to:generated_waypoint_icon [2019/12/22 16:52] – created admindocs:faq:how_to:generated_waypoint_icon [2023/03/20 14:58] (current) lucia.kubickova
Line 3: Line 3:
 ---- ----
  
-GPX Viewer upports starting/pausing, stopping and adding waypoints by automation with [[https://play.google.com/store/apps/details?id=net.dinglisch.android.taskerm|Tasker app]].  +GPX Viewer supports generating custom color and text icons for waypoints defined in gpx or kml files.
-This how to will explain how this could be automated with Tasker app:+
  
-  - In Tasker add new task and add new action **System** -**Send Intent** with these parameters:+In gpx files you can define in <wpt> tag <extensions> tag, then <gpxwpx:WaypointExtension> tag into which you need to add <gpxwpx:icontag. These tags are not included in the gpx schema, so we are providing schema for this on this url: https://www.vecturagames.com/xmlschemas/GpxWaypointExtensionv1.xsd. Example:
  
-  Send Intent [  +  <wpt> 
-    Action: android.intent.action.RUN +    ... 
-    Cat: None +    <extensions> 
-    Mime Type+      <gpxwpx:WaypointExtension> 
-    Data: +        <gpxwpx:icon>...</gpxwpx:icon> 
-    Extra: android.intent.extra.TEXT:TRACK_RECORDING_ACTION_START_PAUSE +      </gpxwpx:WaypointExtension> 
-    Extra+    </extensions> 
-    Extra: +    ... 
-    Package: com.vecturagames.android.app.gpxviewer.pro +  </wpt>
-    Class: +
-    Target: Activity ]+
  
-For starting track recording add **android.intent.extra.TEXT** with parameter **TRACK_RECORDING_ACTION_START_PAUSE**, for stopping track recording change it to **TRACK_RECORDING_ACTION_STOP** and for adding waypoint change it to **TRACK_RECORDING_ACTION_WAYPOINT**.+Inside <gpxwpx:icon> and </gpxwpx:icon> tags instead of ... you can write functions: 
 + 
 +  * **color_marker(color)** - instead of color you need to write the color in RGB format, for example #aab51c 
 +  * **text_marker(string)** - instead of string you need to write a maximum of three characters and a minimum one character, for example 100 
 + 
 +Example for **color_marker(color)**
 + 
 +  <wpt> 
 +    ... 
 +    <extensions> 
 +      <gpxwpx:WaypointExtension> 
 +        <gpxwpx:icon>color_marker(#aab51c)</gpxwpx:icon> 
 +      </gpxwpx:WaypointExtension> 
 +    </extensions> 
 +    ... 
 +  </wpt> 
 + 
 +Result icon: 
 + 
 +[[https://docs.vecturagames.com/gpxviewer/lib/exe/fetch.php?cache=&media=docs:faq:how_to:icon_marker.png|{{ docs:faq:how_to:icon_marker.png }}]] 
 + 
 +Example for **text_marker(string)**: 
 + 
 +  <wpt> 
 +    ... 
 +    <extensions> 
 +      <gpxwpx:WaypointExtension> 
 +        <gpxwpx:icon>text_marker(100)</gpxwpx:icon> 
 +      </gpxwpx:WaypointExtension> 
 +    </extensions> 
 +    ... 
 +  </wpt> 
 + 
 +Result icon: 
 + 
 +[[https://docs.vecturagames.com/gpxviewer/lib/exe/fetch.php?cache=&media=docs:faq:how_to:text_marker.png|{{ docs:faq:how_to:text_marker.png }}]]
  • docs/faq/how_to/generated_waypoint_icon.1577033532.txt.gz
  • Last modified: 2020/08/05 15:28
  • (external edit)