geojson


https://github.com/kevinresol/geojson

To install, run:

haxelib install geojson 0.9.7 

See using Haxelib in Haxelib documentation for more information.

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.

Contributors
kevinresol
Version
0.9.7
Published
3 months ago
License
MIT

All libraries are free

Every month, more than thousand developers use haxelib to find, share, and reuse code — and assemble it in powerful new ways. Enjoy Haxe; It is great!

Explore Haxe

Haxe Manual

Haxe Code Cookbook

Haxe API documentation

You can try Haxe in the browser! try.haxe.org

Join us on Github!

Haxe is being developed on GitHub. Feel free to contribute or report issues to our projects.

Haxe on Github