More on SLURLs and V3. This is hacky, but it works. Basically, we have to redefine the encoding of HG URLs because the viewer messes them up. Examples of what works and doesn't work:
- secondlife://ucigrid00.nacs.uci.edu|8002/128/128 <-- works throughout the viewer - secondlife://http|!!ucigrid00.nacs.uci.edu|8002+Test+Zone+1/128/128 <-- works throughout the viewer - secondlife://http|!!grid.sciencesim.com!grid!hypergrid.php+Yellowstone01+74/128/128 <-- works throughout - secondlife://http%3A%2F%2Fucigrid00.nacs.uci.edu%3A8002%20UCI%20Central%201/128/128 <-- works in chat, but not as URLs in the webkit0.7.4.1
parent
df144eb9e2
commit
18d1d6d3b4
|
@ -97,14 +97,18 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
// Hack to get around the fact that ll V3 now drops the port from the
|
||||
// map name. See https://jira.secondlife.com/browse/VWR-28570
|
||||
//
|
||||
// Caller, use this form instead:
|
||||
// secondlife://mygrid.com|8002|Region+Name/128/128
|
||||
// Caller, use this magic form instead:
|
||||
// secondlife://http|!!mygrid.com|8002|Region+Name/128/128
|
||||
// or url encode if possible.
|
||||
// the hacks we do with this viewer...
|
||||
//
|
||||
string mapNameOrig = mapName;
|
||||
if (mapName.Contains("|"))
|
||||
mapName = mapName.Replace('|', ':');
|
||||
if (mapName.Contains("+"))
|
||||
mapName = mapName.Replace('+', ' ');
|
||||
if (mapName.Contains("!"))
|
||||
mapName = mapName.Replace('!', '/');
|
||||
|
||||
// try to fetch from GridServer
|
||||
List<GridRegion> regionInfos = m_scene.GridService.GetRegionsByName(m_scene.RegionInfo.ScopeID, mapName, 20);
|
||||
|
@ -126,6 +130,11 @@ namespace OpenSim.Region.CoreModules.World.WorldMap
|
|||
data.MapImageId = UUID.Zero;
|
||||
else
|
||||
data.MapImageId = info.TerrainImage;
|
||||
// ugh! V2-3 is very sensitive about the result being
|
||||
// exactly the same as the requested name
|
||||
if (regionInfos.Count == 1)
|
||||
data.Name = mapNameOrig;
|
||||
else
|
||||
data.Name = info.RegionName;
|
||||
data.RegionFlags = 0; // TODO not used?
|
||||
data.WaterHeight = 0; // not used
|
||||
|
|
Loading…
Reference in New Issue