geojson 0.9.6

Released 2016-11-21.

To install, run:

haxelib install geojson 0.9.6

See using Haxelib in Haxelib documentation for more information.

Maintainerkevinresol
Websitehttps://github.com/kevinresol/geojson
Current version0.9.6
StatisticsInstalled 36 times
LicenseMIT
Tags cross, geojson

README.md

geojson Build Status

GeoJSON for Haxe.

Wraps GeoJSON objects with abstracts to provide APIs which are much easier to work with.

Usage

var point = new Point(1.2, 2.1);
trace(point.latitude, point.longitude);
// output: 1.2, 2.1

var lineString = new LineString([
	new Coordinates(1.2, 2.1),
	new Coordinates(1.3, 2.2),
]);
trace(lineString.points[0].latitude, lineString.points[0].longitude);
// output: 1.2, 2.1

trace(haxe.Json.stringify(point, '  '));
/* output:
{
  "type": "Point",
  "coordinates": [
    2.1,
    1.2
  ]
}
*/

trace(haxe.Json.stringify(lineString, '  '));
/* output:
{
  "type": "LineString",
  "coordinates": [
    [
      2.1,
      1.2
    ],
    [
      2.2,
      1.3
    ]
  ]
}
*/

More: See tests folder.