TWiki
> Main
>
HowToShowTheUsersPositionOnScreen
How to: Show the User's Position on Screen
Sometimes you may want to show the user's position on screen as part of your mediascape. In mscape it is possible to show the user on a map, and to display and hide the map as and when required.
This is done using the
MapDisplayer object.
- Open mscape maker, and create a new mediascape.
- Import a map, or create a new map using the map service
- Right-click on Tools on the left hand panel, and select Add Map Displayer
You need to tell the Map Displayer which map it should display. It is possible to show the user a different map to that used for designing the mediascape.
- Ensure that MapDisplayer is selected in the left-hand panel.
- In the properties box, click the drop-down box next to PlaceName and select your map
You do need to tell mscape when you want the MapDisplayer to be shown on the screen, as it will not be shown by default. If you want the map to be shown when the mediascape starts, click on
Mediascape at the top of the list on the left, and select the
OnLoaded event in the script window.
- Drag-and-drop the MapDisplayer object into the OnLoaded window.
- Type a . (period) character to bring up the list of actions and events available on the MapDisplayer? .
- Choose Show
| To hide the MapDisplayer, drag-and-drop the MapDisplayer object to the script window, type . and select Hide |
- Click Try it on.. Tester and the mediascape will open in mscape tester.
You'll see that the MapDisplayer is now visible in the Mobile Device screen. If you click on the map in central panel, you'll see the user's position is shown on both the central panel and the MapDisplayer. The MapDisplayer will show a zoomed-in version of the map by default; if the user gets near the edge of the screen, the view will shift to keep them on the screen.