- return 'http://' + OSM.SERVER_URL + '/?' + querystring.stringify(params) +
- OSM.formatHash({lat: this.getCenter().lat, lon: this.getCenter().lng, zoom: this.getZoom()});
+ var url = 'http://' + OSM.SERVER_URL + '/',
+ query = querystring.stringify(params),
+ hash = OSM.formatHash(this);
+
+ if (query) url += '?' + query;
+ if (hash) url += hash;
+
+ return url;