Example of Milestones Arrangement

The MapXmlExample_RU.xml file with map data converted to the JSON format, and the HTML page, with the map located on it is required to execute an example. The root folder must contain a picture named Yahoo_Weather_001.png.

Add an image milestone for Tula region. To do this, add the following code to the MapLayers item:

"MapLayer.Milestones": {

   "MapPolygonMilestone": {

      "@Offset": "100, 100",

      "@OffsetType": "Absolute",

      "@Points": "100,10 121.6,22.5 121.6,47.5 100,60 78.4,47.52 78.4,22.5",

      "@Fill": "#FF0000"

   },

   "MapImageMilestone": {

      "@Shape": "{RU-NEN}",

      "@Offset": "0.4, 0.6",

      "@OffsetType": "Relative",

      "@Source": "Yahoo_Weather_001.png",

      "@Width": "100",

      "@Height": "69"

   }

}

NOTE. In case object properties are described as items and not as attributes, the following syntax is used: ObjectName.PropertyName (such as, MapLayer.Milestones).

Executing the example adds a polygon shaped milestone (at the specified coordinates) and an image milestone (for the form with the ID RU-NEN) to the Russia.svg map:

See also:

Milestones Item