From 8e6289b8ca2af76f3d59908bf210a492506453e8 Mon Sep 17 00:00:00 2001 From: MW Date: Thu, 21 May 2009 10:54:49 +0000 Subject: Hooked up the RestRegionPlugin Get Region/xxx/terrain so it outputs xml containing the terrain heightmap rather than the old "terrain not implemented" message. The format of the terrain data is: the floats encoded in Base64 and serialised into xml. So I think far from ideal, but as the support for outputting that format was already there... Still need to hook up a method for remotely loading this data. --- OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs index ced3e5c..d0a9e77 100644 --- a/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs +++ b/OpenSim/ApplicationPlugins/Rest/Regions/GETHandler.cs @@ -181,8 +181,12 @@ namespace OpenSim.ApplicationPlugins.Rest.Regions protected string RegionTerrain(OSHttpResponse httpResponse, Scene scene) { - return Failure(httpResponse, OSHttpStatusCode.ServerErrorNotImplemented, - "GET", "terrain not implemented"); + httpResponse.SendChunked = true; + httpResponse.ContentType = "text/xml"; + + return scene.Heightmap.SaveToXmlString(); + //return Failure(httpResponse, OSHttpStatusCode.ServerErrorNotImplemented, + // "GET", "terrain not implemented"); } protected string RegionStats(OSHttpResponse httpResponse, Scene scene) -- cgit v1.1