aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim')
-rw-r--r--OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs18
-rw-r--r--OpenSim/Server/Handlers/Map/MapGetServerConnector.cs5
-rw-r--r--OpenSim/Services/MapImageService/MapImageService.cs2
3 files changed, 15 insertions, 10 deletions
diff --git a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
index 079b1c2..6e142bb 100644
--- a/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
+++ b/OpenSim/Region/CoreModules/World/WorldMap/WorldMapModule.cs
@@ -836,7 +836,10 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
836 block.Access = 254; // means 'simulator is offline' 836 block.Access = 254; // means 'simulator is offline'
837 response.Add(block); 837 response.Add(block);
838 } 838 }
839 remoteClient.SendMapBlock(response, 0); 839 if ((flag & 2) == 2) // V2 !!!
840 remoteClient.SendMapBlock(response, 2);
841 else
842 remoteClient.SendMapBlock(response, 0);
840 } 843 }
841 else 844 else
842 { 845 {
@@ -849,17 +852,20 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
849 { 852 {
850 List<MapBlockData> mapBlocks = new List<MapBlockData>(); 853 List<MapBlockData> mapBlocks = new List<MapBlockData>();
851 List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID, 854 List<GridRegion> regions = m_scene.GridService.GetRegionRange(m_scene.RegionInfo.ScopeID,
852 (minX - 8) * (int)Constants.RegionSize, 855 (minX - 4) * (int)Constants.RegionSize,
853 (maxX + 8) * (int)Constants.RegionSize, 856 (maxX + 4) * (int)Constants.RegionSize,
854 (minY - 8) * (int)Constants.RegionSize, 857 (minY - 4) * (int)Constants.RegionSize,
855 (maxY + 8) * (int)Constants.RegionSize); 858 (maxY + 4) * (int)Constants.RegionSize);
856 foreach (GridRegion r in regions) 859 foreach (GridRegion r in regions)
857 { 860 {
858 MapBlockData block = new MapBlockData(); 861 MapBlockData block = new MapBlockData();
859 MapBlockFromGridRegion(block, r); 862 MapBlockFromGridRegion(block, r);
860 mapBlocks.Add(block); 863 mapBlocks.Add(block);
861 } 864 }
862 remoteClient.SendMapBlock(mapBlocks, 0); 865 if ((flag & 2) == 2) // V2 !!!
866 remoteClient.SendMapBlock(mapBlocks, 2);
867 else
868 remoteClient.SendMapBlock(mapBlocks, 0);
863 869
864 return mapBlocks; 870 return mapBlocks;
865 } 871 }
diff --git a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs
index 9448af7..76dd695 100644
--- a/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs
+++ b/OpenSim/Server/Handlers/Map/MapGetServerConnector.cs
@@ -83,13 +83,12 @@ namespace OpenSim.Server.Handlers.MapImage
83 83
84 string format = string.Empty; 84 string format = string.Empty;
85 result = m_MapService.GetMapTile(path.Trim('/'), out format); 85 result = m_MapService.GetMapTile(path.Trim('/'), out format);
86
87 if (result.Length > 0) 86 if (result.Length > 0)
88 { 87 {
89 httpResponse.StatusCode = (int)HttpStatusCode.OK; 88 httpResponse.StatusCode = (int)HttpStatusCode.OK;
90 if (format.Equals("png")) 89 if (format.Equals(".png"))
91 httpResponse.ContentType = "image/png"; 90 httpResponse.ContentType = "image/png";
92 else if (format.Equals("jpg") || format.Equals("jpeg")) 91 else if (format.Equals(".jpg") || format.Equals(".jpeg"))
93 httpResponse.ContentType = "image/jpeg"; 92 httpResponse.ContentType = "image/jpeg";
94 } 93 }
95 else 94 else
diff --git a/OpenSim/Services/MapImageService/MapImageService.cs b/OpenSim/Services/MapImageService/MapImageService.cs
index 596c4a6..ee424e1 100644
--- a/OpenSim/Services/MapImageService/MapImageService.cs
+++ b/OpenSim/Services/MapImageService/MapImageService.cs
@@ -134,7 +134,7 @@ namespace OpenSim.Services.MapImageService
134 134
135 public byte[] GetMapTile(string fileName, out string format) 135 public byte[] GetMapTile(string fileName, out string format)
136 { 136 {
137 format = "jpg"; 137 format = ".jpg";
138 string fullName = Path.Combine(m_TilesStoragePath, fileName); 138 string fullName = Path.Combine(m_TilesStoragePath, fileName);
139 if (File.Exists(fullName)) 139 if (File.Exists(fullName))
140 { 140 {