GetCamerasInRegion Method
GetCamerasInRegion returns all cameras for a given region.
Note:
If refreshing camera data in many regions, a large number of concurrent requests will be required to refresh data within the recommended 15 minutes. This is due to the overhead of a large number of small API calls. Consider using GetCamerasInBox to fetch camera data more efficiently. The Cameras Map sample illustrates this approach.
Syntax
GetCamerasInRegion(int intRegionID, int intOptions, string strPassword)
Parameters
Name | Type | Description |
---|---|---|
intRegionID | int | Unique region identifier, as returned by other web methods such as GetRegions. |
intOptions | int |
If intOptions is set to 1, only cameras which have streaming video URLs will be returned.
Otherwise, if intOptions is set to 0, cameras which provide still images only and cameras which provide both still images and streaming video URLs are returned.
If intOptions is OR'ed with the value 32, only cameras which have the DetectedOutOfService field set to False will be returned. Otherwise out-of-service cameras will be included. If intOptions is OR'ed with the value 64, only cameras which have the Visibility field set to Low will be returned. |
strPassword | string | Unique id/password supplied to you previously. |
Return Value
Type: XML
For fields for each returned camera, see GetCamerasInBox.
Note: The following fields are not returned: CopyrightNotice, UseWhileDrivingProhibited, FeeToEndUserProhibited, SublicenseProhibited, HistoricalImagesProhibited, and Demonstration. These may be found within the region fields retured by GetRegions, and will be the same for all returned cameras.
Example
Request |
---|
http://www.vizzion.com/TrafficCamsService/TrafficCams.asmx/GetCamerasInRegion?intRegionID=339&intOptions=0&strPassword=<password> |
Response |
---|
... <Cameras diffgr:id="Cameras1" msdata:rowOrder="0"> <CameraID>13970</CameraID> <Latitude>38.807</Latitude> <Longitude>-77.185</Longitude> <Name>Backlick Rd / Edsall Rd</Name> <RegionID>339</RegionID> <UpdateFrequency>1800000</UpdateFrequency> <DetectedOutOfService>false</DetectedOutOfService> <MarkerPost>6.62</MarkerPost> <TMCs>110-10935,110+07401</TMCs> <StreamCoding>H264</StreamCoding> <StreamCoding2>H264</StreamCoding2> <StreamCoding3>H264</StreamCoding3> <StreamContainer>FLV</StreamContainer> <StreamContainer2>MPEG-TS</StreamContainer2> <StreamContainer3>RTP</StreamContainer3> </Cameras> ... |