Welcome to the Second Life Forums Archive

These forums are CLOSED. Please visit the new forums HERE

Suggestion for map API function

Kermitt Quirk
Registered User
Join date: 4 Sep 2004
Posts: 267
12-16-2005 07:06
Quick and easy one... We have a gotoSLURL(x,y) function available. Could we have another version of that which allows us to pass a marker instead of x,y co-ords? Then if we're wanting to teleport them to marker locations we don't have to hard code the co-ords twice.

[edit]
On second thoughts maybe that should be a gotoSLURL method on the marker object?
[/edit]
Argent Stonecutter
Emergency Mustelid
Join date: 20 Sep 2005
Posts: 20,263
12-16-2005 08:25
I think the new teleport API should give you this once it's implemented.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-17-2005 03:11
couldn't you just have the marker read itself via javascript to generate the URL? Or am i missing something here?
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey
Kermitt Quirk
Registered User
Join date: 4 Sep 2004
Posts: 267
12-17-2005 19:15
Not quite sure what you mean by "have the marker read itself". Do you mean just pull the x & y co-ords out of the marker object then pass them into the gotoSLURL function?
The pages for the Map API don't describe any properties on the Marker object that I could use to get the co-ords back out, so I dunno if that's possible. Granted I could just store the co-ords in some other global vars, but I guess it just seemed to me that the ability to jump into SL using a Marker as the location would be a sensible thing to have as part of the API.
Strife Onizuka
Moonchild
Join date: 3 Mar 2004
Posts: 5,887
12-19-2005 02:22
I see what you are saying now.

The Marker Object seems to have a number of attributes and sub objects, the subobjects had more attributes but i'm not willing to rewrite the code so it's more readable just to get attribute names.
CODE

x
y
windowOptions
width
height
doNothing
options
clickHandler
centerOnClick
onMouseOutHandler
onMouseOverHandler
width
height
mapWindow
view
loading
top
left
slCoord
shadowImg
_____________________
Truth is a river that is always splitting up into arms that reunite. Islanded between the arms, the inhabitants argue for a lifetime as to which is the main river.
- Cyril Connolly

Without the political will to find common ground, the continual friction of tactic and counter tactic, only creates suspicion and hatred and vengeance, and perpetuates the cycle of violence.
- James Nachtwey