Doing the HG Map / SimulatorFeatures "the right way": moved it to HGMapModule, hooking on to SimulatorFeatures.OnSimulatorFeaturesRequest event (similar to what the DynamicMenuModule does).

Only HG Visitors get this var, to avoid spamming local users.
The config var  is now called MapTileURL, to be consistent with the login one, and its being picked up from either [LoginService], [HGWorldMap] or [SimulatorFeatures], just because I have a bad memory.
This commit is contained in:
Diva Canto
2013-07-30 21:10:00 -07:00
parent 590a8b0315
commit fd050fca7c
2 changed files with 48 additions and 14 deletions

View File

@@ -68,7 +68,6 @@ namespace OpenSim.Region.ClientStack.Linden
/// </summary>
private OSDMap m_features = new OSDMap();
private string m_MapImageServerURL = string.Empty;
private string m_SearchURL = string.Empty;
private bool m_ExportSupported = false;
@@ -78,15 +77,7 @@ namespace OpenSim.Region.ClientStack.Linden
{
IConfig config = source.Configs["SimulatorFeatures"];
if (config != null)
{
m_MapImageServerURL = config.GetString("MapImageServerURI", string.Empty);
if (m_MapImageServerURL != string.Empty)
{
m_MapImageServerURL = m_MapImageServerURL.Trim();
if (!m_MapImageServerURL.EndsWith("/"))
m_MapImageServerURL = m_MapImageServerURL + "/";
}
{
m_SearchURL = config.GetString("SearchServerURI", string.Empty);
m_ExportSupported = config.GetBoolean("ExportSupported", m_ExportSupported);
@@ -149,13 +140,13 @@ namespace OpenSim.Region.ClientStack.Linden
m_features["PhysicsShapeTypes"] = typesMap;
// Extra information for viewers that want to use it
// TODO: Take these out of here into their respective modules, like map-server-url
OSDMap extrasMap = new OSDMap();
if (m_MapImageServerURL != string.Empty)
extrasMap["map-server-url"] = m_MapImageServerURL;
if (m_SearchURL != string.Empty)
extrasMap["search-server-url"] = m_SearchURL;
if (m_ExportSupported)
extrasMap["ExportSupported"] = true;
if (extrasMap.Count > 0)
m_features["OpenSimExtras"] = extrasMap;