exkml v0.2.5 Exkml

Documentation for Exkml.

Link to this section Summary

Link to this section Functions

Link to this function events!(binstream, chunk_size \\ 2048)

Get events sent directly to the calling process

Returns a unique reference you can use to match on, ref = events!(kml_byte_stream)

Event will be one of {:placemarks, ^ref, from, placemarks} Where placemarks are a list of marks

When you have done what you need to do, send an acknowledgement. The ack contains the ref ref, and is a message back to the from process to make it start parsing the next batch

Like this

  Exkml.ack(from, ref)

{:done, ^ref} When parsing is done {:error, ^ref, ^pid, event} An error with event being the last SAX event

Link to this function on_event(_, event, state)
Link to this function pluck_attribute(attributes, name, value)
Link to this function pop_event(state)
Link to this function pop_geom(state)
Link to this function pop_geom(state, kind)
Link to this function push_event(state, event)
Link to this function push_geom(state, geom)
Link to this function put_attribute(s, name, value)
Link to this function put_error(state, reason)
Link to this function put_in_placemark(pm, geom)
Link to this function put_line(state, text)
Link to this function put_point(state, text)
Link to this function setup(binstream, chunk_size, ref)
Link to this function stage(binstream, chunk_size \\ 2048)
Link to this function str_to_point(point_str)
Link to this function stream!(binstream, chunk_size \\ 2048)

Get a stream of placemarks