llGetRegionWorldMapTile
tracked
Jelly Doll
key llGetRegionWorldMapTile(string region_name)
A LSL function to return the UUID of the current world map tile for a named region, so that it might be placed on a face using PRIM_TEXTURE.
This could also be added to llRequestSimulatorData
Currently the only ways I know to accomplish this depend on MOAP and voodoo to get an image from slurl.com, or pulling the CDN UUID from gridsurvey.com via a HTTPRequest.
Which all seems pretty hacky and unfun.
Log In
Kristy Aurelia
A proposal on how the map tile fetching could be implemented, I mentioned it during SUG meeting, here's a more detailed version.
First, a UUID has a version number:
6304242a-10c3-4b3c-a03a-cdc3e7ca12f0
4
in the 3rd group in this case, there are other versions too, but none of them use 0. We can take advantage of it. If we set UUID version to 0
, we know that llGenerateKey() or any other UUID generation functions, will never return a UUID with 0
in that spot.Then, we can change the start bytes of the UUID to some fixed value, let's say
123
- this will be our "This is a map tile" marker. In the future a similar UUID with starting value 124
could be used for other features, like painted terrain or something, but I digress.Then, we still have bytes leftover, so, the other bytes could be used to encode the map tile XY position.
So when llGetRegionWorldMapTile(x, y) is called, it returns the special UUID for those specific map coordinates.
Then, when that UUID is applied as a texture, the viewer sees the
0
and the 123
prefix and it knows "Oh, this is a special texture" and instead of fetching it from the CDN, it works similar to BoM, and fetches the texture from the Map Tile Asset Service, or wherever the tiles are stored. Also this way it would know that it is a special texture and that it should cache it for too long, as it could change in the future, once it encounters that UUID later, it just grabs a new map tile, just like BoM does.Older viewers, that don't support map tiles, would just get "texture not found" from the CDN.
Since XY is encoded into the UUID, the special map tile UUID never changes for any map tile, but underlying texture can change, since the viewer would fetch it from a different source, which would always return the latest tile.
mcarp Mavendorf
did you not realize we already had this before web on a prim and LL KILLED IT for web on a prim maps
Nexii Malthus
Please keep it flexible for type of tile, e.g. terrain and object maps that exist. As well as open for future enhancements later down the road (for when we get infrastructure and other details highlighted like roads)
Nyx Onyx
If at all possible, I'd love if it could zoom down to the level of centering a parcel on the map, if you provide such a parameter. =) Perhaps it can be done by having the function not return a UUID, but a list -with- the UUID and parameters needed for zooming in on a given parcel.
Atomic Infinity
It would be good if it followed the current map texture API format so maybe its a string of the map texture UUID :
string llMapTexture(integer zoom, integer region_x, integer region_y);
This adds the full range of zoom levels that the in-world map already uses, and also it would be really compatible for updating stuff people already did with MOAP in the hacky and unfun way :D
animats Resident
Atomic Infinity Only the 1-region map tiles have UUIDs. The 4-region, 16-region, 64-region, etc. tiles aren't in SL asset storage. They're only available from the web API. (I asked at Server User Group, because I have a use for those.)
Paul Hexem
Speaking as someone that keeps having to update products due to external servers changing, this really should be a native thing in SL and not rely on third parties. Especially because the data is already on the servers- there's no reason not to expose it to LSL.
Extrude Ragu
It would be nice to have the ability to get the tile uuid by grid coordinate - ie so you don't have to look up the name of the neighboring region to display its map tile, which is an additional api call.
Spidey Linden
Merged in a post:
Add method to get map UUIDs
Jenni Darkwatch
Currently there's only external services if one wants to have map UUIDs in SL, or use MoaP which not everyone has enabled.
Getting those UUIDs is useful e.g. for live navigation maps or live region maps would be very useful.
I'd propose to either extend llGetEnv() with two flags map_terrain and map_objects or extend llRequestSimulatorData() with DATA_SIM_MAP_TERRAIN and DATA_SIM_MAP_OBJECTS, depending on where that data would be easier fetchable for the sim.
Vincent Nacon
Need to be able to get the texture by grid coordinate instead of just by the string name.
Gloss Doll
See also https://feedback.secondlife.com/scripting-features/p/llgetregionworldmaptile which is marked
TRACKED
Load More
→