TrafficCamNZ XML camera file import 26 January 2009Posted by David Wilson in Uncategorized.
Tags: Apple, AppStore, Camera, iPhone, traffic, trafficcamnz, XML
Version 1.1.1 of TrafficCamNZ has been submitted to the iTunes AppStore for approval. The new features in this release are:
- Added more cameras to the default list mostly from the USA (I-25 & Colorado)
- Added ability to download default camera list from an XML file
- Added preferences screen to specify URL of where XML camera list file is. Default is http://dgwilson65.googlepages.com/TrafficCamNZCameras.xml
- Moved the info button (default camera merge) to the preferences screen
- Fixed a bug where editing camera details allowed you to add multiple cameras
- Added ability to duplicate a camera
- On Application start, the specified web address is checked for a new camera list, the user is notified and asked if the list should be merged with the existing camera list
The key change here is that the camera list can be easily updated in bulk without having to submit a new release of the application via the iTunes AppStore.
You can now build your own list of camera for bulk import. All you need is a text editor, a list of cameras, and a web server (Mac users can use the Web server built into Mac OS X). Or you can mail me with camera lists and I can put them online by adding them to the master list for export.
So what does the XML file look like? Well you can download it from here and open it with a text editor. The file looks like this…
<key>Application</key> <string>TrafficCamNZ</string> <key>Version</key> <string>1.1</string> <key>Release</key> <string>5</string> <key>UpdateXMLURL</key> <string>http://dgwilson65.googlepages.com/TrafficCamNZCameras.xml</string> <key>Cameras</key> <array> <dict> <key>URL</key> <string>http://www.springsgov.com/trafficeng/bImage.asp?camid=27</string> <key>Description</key> <string>[USA] Garden of the Gods/Nevada</string> </dict> <dict> <key>URL</key> <string>http://www.springsgov.com/trafficeng/bImage.asp?camid=14</string> <key>Description</key> <string>[USA] Austin Bluffs/Union</string> </dict>
You update the file by removing or adding dictionary items to the Cameras array. You can see above where the key URL precedes the actual URL and after that its Description. Update / release these entries ensuring that the XML syntax is maintained (if you don’t it won’t load and you won’t get much help telling you what is wrong).
The key “Release” is used by the program to determine if there is a update available to load. Increment this number if you have a new version to load.
The key “UpdateXMLURL” is used by the program to determine if the XML loading URL should be updated. I put this in just in case I need to move web sites for the XML update. This means that I can make the change simply and silently. You can update this in your file too if you like. The change is displayed on the application preferences screen.
Once you have your updated file, place it on a web server that your iPhone can access. Update the preferences screen to point to the XML file and touch “Load/merge camera list from WWW”.