Dev: SM: Example - Points

From AAT Wiki
Jump to: navigation, search

XML Call - Nearest Classified Points

This it the URL / XML Call to the Streetmaps Server for Points of Interest near a certain position.

https://www.streetmaps.co.za/ajax_points.asp?key=YOUR KEY HERE&x=30.835998&y=-29.792129&closest=10&cat=86

OR

https://www.streetmaps.co.za/ajax_points.asp?key=YOUR KEY HERE&x=30.835998&y=-29.792129&closest=10&set=user@gmail.com
KEY (string) Your Unique API key must always be passed to the server
x and y (float) The point on the map where you want to find nearby points
cat (int list) A comma-delimited list of the categories which you want to show points for. You can get a list of categories from https://www.streetmaps.co.za/categories.asp ... omitting this parameter will return all points near the specified location
set (string) Find the closest number of points that belong to this set. This will usually be your login name, but if you have more than one account and therefore more than one data set, this will return only points from that data set.
closest (int) A number specifying the number of points closest to the specified anchor point to return. NOTE: The maximum number of points a free API user can request is 25.


XML Call - Points in an Area

This it the URL / XML Call to the Streetmaps Server for Points of Interest within a certain distance of a point

https://www.streetmaps.co.za/ajax_points.asp?key=YOUR KEY HERE&x=30.835998&y=-29.792129&r=0.5&max=100
KEY (string) Your Unique API key must always be passed to the server
x and y (float) The point on the map where you want to find nearby points
r (float) The radius in which to return point, in degrees. This has to be less than 1.
max (int) A number specifying the number of points closest to the specified anchor point to return. The closest "max" points will be returned.

Results

Here are the results from a sample search

  <?xml version="1.0" ?> 
  <results type="points">
  <anchor area="KLOOF, KWAZULU NATAL" x="30.835998" y="-29.792129" /> 
  <poi x="30.83391" y="-29.79197" caption="Stokers Arms" ref="141984" cat="86" link="https://www.streetmaps.co.za/detail.asp?ref=HVRCTXFNTJTGLYDZFZNPYTAWDQQLHCCD" metersfrom="0.20"/> 
  <poi x="30.83737" y="-29.79432" caption="Enrico's Trattoria Restaurant" ref="139568" cat="86" link="https://www.streetmaps.co.za/detail.asp?ref=FVKSMWOLWFRHBWKZHJNIWDRTWKDPYOZG" metersfrom="20.20" /> 
  <poi x="30.84134" y="-29.79542" caption="Paparazzi Italian Restaurant" ref="141256" cat="86" link="https://www.streetmaps.co.za/detail.asp?ref=FAEJLGXBVXNQCJBVSEWDTQXRFYVJGEQV" metersfrom="16.20" /> 
  <poi x="30.85602" y="-29.8102" caption="Wimpy Fast Food Pinetown" ref="142699" cat="86" link="https://www.streetmaps.co.za/detail.asp?ref=FKBVSBMPRXWJSIODIBZEGFBUFYFJUTFK" metersfrom="303.20"/> 
  <poi x="30.85923" y="-29.81276" caption="Butcher Block Restaurant" ref="981" cat="86" link="https://www.streetmaps.co.za/detail.asp?ref=HFOOUGTBHKUPDRVINWGBRPPWUTYKRBOU"metersfrom="303.20" /> 
  <poi x="30.86658" y="-29.81706" caption="Nando's Restaurant" ref="140969" cat="86" link="https://www.streetmaps.co.za/detail.asp?ref=UKMVRHJDRLBVIHKIJBUIYLDYOOGMSAKU" metersfrom="30.20"/> 
  <poi x="30.8748" y="-29.83473" caption="Nando's Restaurant" ref="140963" cat="86" link="https://www.streetmaps.co.za/detail.asp?ref=ZEGOQJMUKQBXRETNFBAYKHFDFJSKYPVZ" metersfrom="503.20"  /> 
  <poi x="30.77591" y="-29.79691" caption="Seasons Restaurant" ref="141701" cat="86" link="https://www.streetmaps.co.za/detail.asp?ref=HDPTLVKZCYDXINQTXQWKTWCEPKYSWXHJ" metersfrom="100.20"/> 
  <poi x="30.8222" y="-29.73315" caption="Crinkley Bottom Park" ref="139296" cat="86" link="https://www.streetmaps.co.za/detail.asp?ref=TJHUFARTWJPFHILPKDRLJWUCWRTLIOKS" metersfrom="103.20"/> 
  <poi x="30.77401" y="-29.78723" caption="The Mamba Grill House" ref="142165" cat="86" link="https://www.streetmaps.co.za/detail.asp?ref=LHJWVGNRRGDFMDWCUMYMTKFVOJHWSILV" metersfrom="303.20"/> 
  </results>
x, y The position of the point
caption The name of this point
cat Category this point is classified under, A list of categories is available at https://www.streetmaps.co.za/categories.asp
link A link to the full details of the entry. Paying customers will have direct access to these details
metersfrom The distance in meters from your Point of interest (x,y entered) to this point.