Change the map tile system to be multi-grid hosting compatible

This commit is contained in:
Melanie Thielker
2014-08-23 17:27:01 +02:00
parent f06f13b59d
commit cbd7c7b9ec
7 changed files with 49 additions and 28 deletions

View File

@@ -38,6 +38,7 @@ using OpenSim.Server.Base;
using OpenSim.Services.Interfaces;
using OpenSim.Framework.Servers.HttpServer;
using OpenSim.Server.Handlers.Base;
using OpenMetaverse;
namespace OpenSim.Server.Handlers.MapImage
{
@@ -93,7 +94,16 @@ namespace OpenSim.Server.Handlers.MapImage
byte[] result = new byte[0];
string format = string.Empty;
result = m_MapService.GetMapTile(path.Trim('/'), out format);
UUID scopeID = new UUID("07f8d88e-cd5e-4239-a0ed-843f75d09992");
string[] bits = path.Trim('/').Split(new char[] {'/'});
if (bits.Length > 1)
{
scopeID = new UUID(bits[0]);
path = bits[1];
}
result = m_MapService.GetMapTile(path.Trim('/'), scopeID, out format);
if (result.Length > 0)
{
httpResponse.StatusCode = (int)HttpStatusCode.OK;