Page 1 of 1
How to fix the map
Posted: 13 Jul 2008, 09:35
by jackygu
Hi,
I want to fix the map in the window, that means if the avatar approch the side, the map will not scroll.
How can we do?
Tks.
Posted: 14 Jul 2008, 06:53
by Bax
You can do this only if the overall map size in pixels is less than the viewport size. We may add a method in the final release to inhibit the scrolling.
Posted: 12 Nov 2008, 21:32
by pt_dev
Hi bax,
We may add a method in the final release to inhibit the scrolling.
Does this method come out yet? if so, how can we use?
I can't seem to find any information on this issue.
- pt_dev
Posted: 17 Nov 2008, 09:05
by Bax
No sorry, currently there's no way to inhibit scrolling.
The options you have are:
1. make the map smaller than the viewport;
2. in the xml configuration file set the <ScrollSensorSize> parameter to 100 and do something like this on the map (also, make the avatar appear in the center of the map):

Posted: 28 Dec 2008, 17:55
by Dorru
bax wrote:No sorry, currently there's no way to inhibit scrolling.
The options you have are:
1. make the map smaller than the viewport;
2. in the xml configuration file set the <ScrollSensorSize> parameter to 100 and do something like this on the map (also, make the avatar appear in the center of the map):

Must be a way to not have to make the avatar appear in the center and still have the viewport like in the picture? Think of a map with the background of a single room, would you want the avatar to appear in the center of the room instead from a door?
Posted: 04 Jan 2009, 14:49
by Dorru
Is it possible or do you have to use centerViewOnTile?
If thats the case, how should the code look like and where would you place it?
Posted: 06 Jan 2009, 16:31
by Bax
Yes, using the centerViewOnTile method is the right way to do what you need. Check the API documentation on its usage. You will have to call it right after the creation of the user's avatar.