Dev: SM: Vector File Renderer

From AAT Wiki
Jump to: navigation, search


The Image Daemon is a service that delivers images and json from uploaded SHP and KML files. The service name ImageDaemon and listens on the default port of 5505. Data is stored in the user_features table.


You can Upload your SHP / KML file in zip format here If you are upload SHP files, the ZIP should include all other files EG: .dbf, .prj, .sbn .. etc

Image Rendering


x = longitude

y = latitude

s = degree scale

w = pixel width of required image

h = pixel height of required image

id = After uploading you File you will be given a ID to be placed here.

Styles = set the color of the Route and thickness

     Id = all for everything, else it is the name of the source file in the zip. Eg stage1 (no extension)
     Lc = color in google kml format.
     Lw = line width
     For multiple styles ={id:route1;lw:5;lc:ff0000},{id:route2;lw:5;lc:ff0000}


imgtype = jpg, default is png

Overlay on maps

Add the following two Lines to the Maps load function (Basic_Map)

        featurelayer = myMap.AddLayer("custom", 4);



json=java function to execute on return. It can include a ( for eg json=processJS(myvar,'a const, and it will just add the json and closing );

The json param is optional, so call can be xmlrequest

exclude=1 to make it only return points within the x,y,w,h,s limits, otherwise it returns all points for id. Line and Polygon structures are ignored.

id=comma delimited list of uf_ref values

Returns the following json structure:

{data : 
{id:?, points : [elementid:?, name:?, description:?, x:?, y:?],...},
{id:?, points : [elementid:?, name:?, description:?, x:?, y:?],...},

Click Test


x,y = the long/lat to test.

All polygons in the id list are checked and the first that contains x,y is returned.

Returns the following json structure:

{id:?, elementid:?, name:?, description:?}

Element Info


Returns the following json structure:

{id:?, elementid:?, name:?, description:?}