[sldev] [VIEWER] Re: New viewer released with logging of the owners of speaking objects and their location

John Hurliman jhurliman at wsu.edu
Fri Aug 31 15:31:56 PDT 2007


Dale Glass wrote:
> On Friday 31 August 2007 23:09:18 Harold Brown wrote:
>   
>> They are there now.
>>
>> https://cap.secondlife.com/cap/0/d661249b-2b5a-4436-966a-3d3b8d7a574f
>>
>> Is the URL for the Region name to co-ordinate service.
>>
>> Call it with :
>> https://cap.secondlife.com/cap/0/d661249b-2b5a-4436-966a-3d3b8d7a574f?var=a
>> &sim_name=Ahern
>>     
> This doesn't work for what I need, if I already knew the sim's key and name I 
> wouldn't be doing requests in the first place.
>
>   

I think Harold was just providing full documentation on what is 
available now (and getting a region handle from a name is very handy!), 
the one you are looking for is below.

>> There is also the reverse:
>>
>> https://cap.secondlife.com/cap/0/b713fe80-283b-4585-af4d-a3b7d9a32492?var=s
>> lRegionName&grid_x=997&grid_y=1002
>>     
> Do I need to know the position?
>
> I tried 
> https://cap.secondlife.com/cap/0/b713fe80-283b-4585-af4d-a3b7d9a32492?var=slRegionName, 
> that doesn't work.
>
>   

I don't quite understand; in your e-mail the query just says 
"?var=slRegionName". What value were you expecting for that query? If 
you do the UUID -> RegionHandle lookup and break down the handle in to X 
and Y you can do that CAPS request and get back simulator name that you 
need. No bundled databases, no javascript parsing, no fallback code, 
this is exactly what is needed and would close out the JIRA request if 
it was already posted.

I messed up a technical detail in my previous description about region 
handles. It actually encodes the global x and y position in meters, and 
you have to *divide* by 256 to get what you are looking for here. Lets 
take the case of Ahern. You start with the UUID 
ac2726a5-bbc8-ed96-0eac-712c5a023501, do a lookup and get RegionHandle 
1096213093149184. Shift, mask, and get X: 255232 Y: 256512. Divide 
255232/256 = 997, 256512/1002 = 1002. Feed those to grid_x and grid_y 
parameters in the CAPS query above and you get back "Ahern".

>   
>> It returns:
>>
>> var slRegionName='Ahern';
>>     
>
> BTW, is there a way to get it to return results in XML serialized LLSD?
>   


That would be a great feature request, so we can stop implementing LLSD 
parsers (which is like writing a JSON parser with a few strong types) in 
every language under the sun. The viewer already has an LLSD parser 
though, so for the current task it shouldn't be an issue.

John


More information about the SLDev mailing list