-function addObjectToMap(url, zoom, callback) {
- var layer = new OpenLayers.Layer.GML("Objects", url, {
- format: OpenLayers.Format.OSM,
+function addObjectToMap(object, zoom, callback) {
+ var layer = new OpenLayers.Layer.Vector("Objects", {
+ strategies: [
+ new OpenLayers.Strategy.Fixed()
+ ],
+ protocol: new OpenLayers.Protocol.HTTP({
+ url: OSM.apiUrl(object),
+ format: new OpenLayers.Format.OSM()
+ }),