summaryrefslogtreecommitdiff
path: root/indra/newview/llfloaterworldmap.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'indra/newview/llfloaterworldmap.cpp')
-rw-r--r--indra/newview/llfloaterworldmap.cpp32
1 files changed, 31 insertions, 1 deletions
diff --git a/indra/newview/llfloaterworldmap.cpp b/indra/newview/llfloaterworldmap.cpp
index b7e8835fb8..6567c1a649 100644
--- a/indra/newview/llfloaterworldmap.cpp
+++ b/indra/newview/llfloaterworldmap.cpp
@@ -45,6 +45,7 @@
#include "llcallingcard.h"
#include "llcombobox.h"
#include "llviewercontrol.h"
+#include "llcommandhandler.h"
#include "lldraghandle.h"
#include "llfirstuse.h"
#include "llfloaterreg.h" // getTypedInstance()
@@ -96,6 +97,35 @@ static const F32 SIM_COORD_DEFAULT = 128.f;
// Globals
//---------------------------------------------------------------------------
+// handle secondlife:///app/worldmap/{NAME}/{COORDS} URLs
+class LLWorldMapHandler : public LLCommandHandler
+{
+public:
+ // requires trusted browser to trigger
+ LLWorldMapHandler() : LLCommandHandler("worldmap", UNTRUSTED_THROTTLE) { }
+
+ bool handle(const LLSD& params, const LLSD& query_map,
+ LLMediaCtrl* web)
+ {
+ if (params.size() == 0)
+ {
+ return false;
+ }
+
+ const std::string region_name = params[0].asString();
+ S32 x = (params.size() > 1) ? params[1].asInteger() : 128;
+ S32 y = (params.size() > 2) ? params[2].asInteger() : 128;
+ S32 z = (params.size() > 3) ? params[3].asInteger() : 0;
+
+ LLFloaterWorldMap::getInstance()->trackURL(region_name, x, y, z);
+ LLFloaterReg::showInstance("world_map", "center");
+
+ return true;
+ }
+};
+LLWorldMapHandler gWorldMapHandler;
+
+
LLFloaterWorldMap* gFloaterWorldMap = NULL;
class LLMapInventoryObserver : public LLInventoryObserver
@@ -297,7 +327,7 @@ void LLFloaterWorldMap::onOpen(const LLSD& key)
LLFirstUse::useMap();
// Start speculative download of landmarks
- LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLAssetType::AT_LANDMARK);
+ const LLUUID landmark_folder_id = gInventory.findCategoryUUIDForType(LLFolderType::FT_LANDMARK);
gInventory.startBackgroundFetch(landmark_folder_id);
childSetFocus("location", TRUE);