Template:Zh OpenStreetMap Internal: Difference between revisions

From Documentation
Jump to navigation Jump to search
(Created page with "In Paths properties '''Layer type''' is * KML (Internal Parser) * GPX (Internal Parser) By user requests I decided to create my own file parser. For example, your file can...")
 
 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
== Description Internal Parser Types ==
In Paths properties '''Layer type''' is
In Paths properties '''Layer type''' is


Line 10: Line 12:


Moreover, when I have all data parsed, I can control and add different features. For exmple, you can use placemark clusterization for placemarks (Points or Waypoints) from file.
Moreover, when I have all data parsed, I can control and add different features. For exmple, you can use placemark clusterization for placemarks (Points or Waypoints) from file.


Now processed next tags
Now processed next tags


'''KML''' file
=== '''KML''' file ===


''Style'' - style definition  
*''Style'' - style definition  
** IconStyle
** IconStyle
*** Icon
**** href
**** scale
** LineStyle
** LineStyle
*** color
*** width
** PolyStyle
** PolyStyle
*** color
*** outline
*** fill




''StyleMap'' - styles (normal, highlight) - hovering case
*''StyleMap'' - styles (normal, highlight) - hovering case
** Pair
*** key
*** styleUrl




''Placemark'' - objects
*''Placemark'' - objects
** Point - placemarks
** Point - placemarks
*** coordinates
** MultiGeometry
** MultiGeometry
*** LineString - polylines
*** LineString - polylines
**** coordinates
*** Polygon - polygons
*** Polygon - polygons
** Polygon - polygons
**** outerBoundaryIs - polygon shape
*** MultiTrack
***** LinearRing
****** coordinates
**** innerBoundaryIs - polygon holes
***** LinearRing
****** coordinates
** Polygon - polygons without MultiGeometry
*** outerBoundaryIs - polygon shape
**** LinearRing
***** coordinates
*** innerBoundaryIs - polygon holes
**** LinearRing
***** coordinates
** MultiTrack
*** gx:Track - polylines
*** gx:Track - polylines
** gx:Track - polylines
**** gx:coor
** gx:Track - polylines without MultiTrack
*** gx:coor
 
*''Folder''
 
 
*''Document''
 
 
=== '''GPX''' file ===
 
*''trk'' - track definition
** extensions
*** gpxx:TrackExtension
**** gpxx:DisplayColor - color
** trkseg - track segments
*** trkpt - track point
*''wpt'' - waypoint definition
*''rte'' - route definition
** rtept - route point definition
 
=== Path properties ===
 
The next Path properties can apply to layer
 
* ''Layer Show Type'' - if set to '''Zoom''' you get fit map bounds to display layer on max zoom
* ''Suppress Popup'' - suppress all popups, if you want to have fine control of popups set it to ''No'' and use the next properties
* ''Popup content for Placemark''
* ''Popup content for Polyline''
* ''Popup content for Polygon''
* ''Tooltip content for Polyline''
* ''Tooltip content for Polygon''
 
The values can be
* ''Suppress'' - suppress feature
* ''Name'' - use tag ''name'' for value
* ''Description'' - use tag ''description'' (for KML) or ''desc'' (for GPX)
* ''Description, if not defined then Name'' use value of Description, if it is not defined then Name
 
 
You can use Tooltips to show hover text for polylines and polygons, and flexible define what content will have popups.
 
 
=== Map properties ===
 
The next Map properties can apply to layer
* ''Show placemarks in cluster'' - enable placemark clusterization
** all properties of clusterer applied to Path Placemarks
 
* ''Placemark Group Control'' - you can show/hide your paths
** ''Manage Placemarks'' - allow show/hide not only your placemarks, but also Path Placemarks
 
 
 
=== Placemark Icons ===
 
KML file can contain icon for placemark and icon for hover case. Icons has full URL, therefore it can be shown correctly.
 
 
GPX file can contain icon for placemark, but in this case it is simple icon name in tag '''sym'''
 
You can easy to check icon name by opening your file in any text editor.
 
For this case you can upload your own icons in png format into special folders on your server
<pre>
administrator/components/com_zhosmmap/assets/gpx/
components/com_zhosmmap/assets/gpx/
</pre>
 
The first folder - it is for administration part (for case component option '''Compatibility for resource files''' is disabled.


* Folder
The second folder - in case you enable this option.
* Document

Latest revision as of 13:00, 7 September 2020

Description Internal Parser Types

In Paths properties Layer type is

  • KML (Internal Parser)
  • GPX (Internal Parser)


By user requests I decided to create my own file parser.

For example, your file can contain not only one line with different colors (or other properties), and you want to use internal settings from file.

Moreover, when I have all data parsed, I can control and add different features. For exmple, you can use placemark clusterization for placemarks (Points or Waypoints) from file.


Now processed next tags

KML file

  • Style - style definition
    • IconStyle
      • Icon
        • href
        • scale
    • LineStyle
      • color
      • width
    • PolyStyle
      • color
      • outline
      • fill


  • StyleMap - styles (normal, highlight) - hovering case
    • Pair
      • key
      • styleUrl


  • Placemark - objects
    • Point - placemarks
      • coordinates
    • MultiGeometry
      • LineString - polylines
        • coordinates
      • Polygon - polygons
        • outerBoundaryIs - polygon shape
          • LinearRing
            • coordinates
        • innerBoundaryIs - polygon holes
          • LinearRing
            • coordinates
    • Polygon - polygons without MultiGeometry
      • outerBoundaryIs - polygon shape
        • LinearRing
          • coordinates
      • innerBoundaryIs - polygon holes
        • LinearRing
          • coordinates
    • MultiTrack
      • gx:Track - polylines
        • gx:coor
    • gx:Track - polylines without MultiTrack
      • gx:coor
  • Folder


  • Document


GPX file

  • trk - track definition
    • extensions
      • gpxx:TrackExtension
        • gpxx:DisplayColor - color
    • trkseg - track segments
      • trkpt - track point
  • wpt - waypoint definition
  • rte - route definition
    • rtept - route point definition

Path properties

The next Path properties can apply to layer

  • Layer Show Type - if set to Zoom you get fit map bounds to display layer on max zoom
  • Suppress Popup - suppress all popups, if you want to have fine control of popups set it to No and use the next properties
  • Popup content for Placemark
  • Popup content for Polyline
  • Popup content for Polygon
  • Tooltip content for Polyline
  • Tooltip content for Polygon

The values can be

  • Suppress - suppress feature
  • Name - use tag name for value
  • Description - use tag description (for KML) or desc (for GPX)
  • Description, if not defined then Name use value of Description, if it is not defined then Name


You can use Tooltips to show hover text for polylines and polygons, and flexible define what content will have popups.


Map properties

The next Map properties can apply to layer

  • Show placemarks in cluster - enable placemark clusterization
    • all properties of clusterer applied to Path Placemarks
  • Placemark Group Control - you can show/hide your paths
    • Manage Placemarks - allow show/hide not only your placemarks, but also Path Placemarks


Placemark Icons

KML file can contain icon for placemark and icon for hover case. Icons has full URL, therefore it can be shown correctly.


GPX file can contain icon for placemark, but in this case it is simple icon name in tag sym

You can easy to check icon name by opening your file in any text editor.

For this case you can upload your own icons in png format into special folders on your server

administrator/components/com_zhosmmap/assets/gpx/
components/com_zhosmmap/assets/gpx/

The first folder - it is for administration part (for case component option Compatibility for resource files is disabled.

The second folder - in case you enable this option.