-
Notifications
You must be signed in to change notification settings - Fork 58
Data Stores
Jason Aller edited this page Jan 15, 2015
·
1 revision
It is possible to use Wayfinding either with or without datastores.
If datastores are not used:
- the client needs to analyse the map on when loaded, and each time the startpoint or accessibility are changed
- a change in the svg map files is all that is needed to change the end user experience
If datastores are used:
- the client loads in a pre-calculated datastore each time the startpoint or accessibility are changed.
- some calls need to be set up with callbacks in order to handle the asynchronous loading of the datastores
- each set of changes to the svg files will require pre-calculation of the maps
- it is possible to keep a working copy of the maps and serve up svg to the client that does not include the doors, paths, and portal segments
It is recommended that during map development that datastores not be used as this will increase the turn around speed during development, but should be implemented for any complex maps, or in cases where the plugin may be used with end user machines such as smart phones.
- Install nodeJS
- Edit index.html so that it will load your maps instead of the two sample maps
- in one console window type
grunt server
(an upgrade is planned to consolidate this all into a single grunt command) - in a separate window type
node tasks\datastores.js
and in the prompts that follow: - the first prompt is the URL to reach the server that we started by typing
grunt server
- next allows you to choose between typing all or supplying a path and filename to a file that contains door identifiers one per line. This tells the process which startpoints to pre-calculate. If "all" is chosen then it will scan the maps and file all the doors.
- the last is the path to an existing folder where the .JSON files will be written. there will be two for each door; one for default, and one or accessible.