Changes between Version 4 and Version 5 of ZooWebSite/ZOOAPI/Examples


Ignore:
Timestamp:
Nov 10, 2010, 1:23:20 PM (9 years ago)
Author:
djay
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • ZooWebSite/ZOOAPI/Examples

    v4 v5  
    11= ZOO API Examples =
    22
    3 Documentation is under construction
     3In this page you can find some small examples on how to use the JavaScript ZOO-API on the server side.
    44
     5The ZOO-API contains many classes and functions for which you can find description [wiki:ZooWebSite/ZOOAPI/Classes here].
    56
    6 == ZOO API Classes ==
     7== ZOO.Process example of use ==
    78
    8 ZOO.Bounds
    9 
    10 ZOO.Projection
    11 
    12 ZOO.Format
    13 
    14 ZOO.Format.WKT
    15 
    16 ZOO.Format.JSON
    17 
    18 ZOO.Format.GeoJSON
    19 
    20 ZOO.Format.KML
    21 
    22 ZOO.Format.GML
    23 
    24 ZOO.Feature
    25 
    26 ZOO.Geometry
    27 
    28 ZOO.Geometry.Point
    29 
    30 ZOO.Geometry.Surface
    31 
    32 ZOO.Geometry.MultiPoint
    33 
    34 ZOO.Geometry.Curve
    35 
    36 ZOO.Geometry.LineString
    37 
    38 ZOO.Geometry.LinearRing
    39 
    40 ZOO.Geometry.MultiLineString
    41 
    42 ZOO.Geometry.MultiPolygon
    43 
    44 ZOO.Process
    45 
     9{{{
     10#!c
     11var myProcess = new ZOO.Process('http://localhost/cgi-bin-new1/zoo_loader_new1.cgi','Boundary');
     12var myInputs = { InputPolygon: {value: "[[[-106.993853,35.998758],[-107.407233,35.997524],[-107.430525,35.997726],[-107.4824,35.99878],[-108.37013,35.999472],[-109.043633,35.996652],[-109.096265,35.997817],[-109.148763,36.001751],[-109.200981,36.008442],[-109.252775,36.017871],[-109.304,36.030014],[-109.354516,36.044835],[-106.468201,35.991497],[-106.855511,35.989504],[-106.90933,35.990676],[-106.963008,35.994743],[-106.993853,35.998758]]]",encoding: "application/json"} };
     13var myExecuteResult=myProcess.Execute(myInputs);
     14var wps = new ZOO.Format.WPS();
     15var myOutputs = wps.read(myExecuteResult);
     16return {result: ZOO.SERVICE_SUCCEEDED, outputs: [ {name:"Result", value: myOutputs} ] };
     17}}}

Search

Context Navigation

ZOO Sponsors

http://www.zoo-project.org/trac/chrome/site/img/geolabs-logo.pnghttp://www.zoo-project.org/trac/chrome/site/img/neogeo-logo.png http://www.zoo-project.org/trac/chrome/site/img/apptech-logo.png http://www.zoo-project.org/trac/chrome/site/img/3liz-logo.png http://www.zoo-project.org/trac/chrome/site/img/gateway-logo.png

Become a sponsor !

Knowledge partners

http://www.zoo-project.org/trac/chrome/site/img/ocu-logo.png http://www.zoo-project.org/trac/chrome/site/img/gucas-logo.png http://www.zoo-project.org/trac/chrome/site/img/polimi-logo.png http://www.zoo-project.org/trac/chrome/site/img/fem-logo.png http://www.zoo-project.org/trac/chrome/site/img/supsi-logo.png http://www.zoo-project.org/trac/chrome/site/img/cumtb-logo.png

Become a knowledge partner

Related links

http://zoo-project.org/img/ogclogo.png http://zoo-project.org/img/osgeologo.png