ucdavis / wayfinding

jQuery plugin for interactive svg maps
100 stars 58 forks source link

View several maps at the same time #40

Open dsuarez opened 8 years ago

dsuarez commented 8 years ago

Hello,

I am interested in using the software for a shopping center; however, I have a request: the kiosk has to show 3 floors at the same time. Is there a way to do this with little effort?

jraller commented 8 years ago

I was initially thinking that you could show all three floors on a single map and use portals within that map, but I'm not sure that a portal can link to another location on the same map. That could be added. However what would work is to layout the three floors in a single map and show connections between them as paths which will work and have the benefit of showing a contiguous line rather than jumping between parts of the map to show travel.

dsuarez commented 8 years ago

The last option sounds good, but I would't like to show the path between floors (I think the straight line connecting floors should be weird). Is there a way to hide a path section? The time may be also a problem, because the system path would travel the line section at the same pace as the normal floor sections, and it will be longer. Probably a popup message when the path goes by a stairs of lift would be fine.

I think it can be accomplished. We would need to add some kind of things to the system:

Would it work?

jraller commented 8 years ago

I'm not totally sure if a portal used to link to another location on the same map would work, but getting that to work would seem to be a good option. Try making a portal to another location on the same map, I suspect that it won't like that, and I'll have to modify the code to be happy with portals to other locations on the same map.

dsuarez commented 8 years ago

Thanks for the support. That will be great, but I think I did't explain myself properly. I am thinking about forgetting portals. Just simple paths between different floors in the same svg. That path section can be hidden and faster than regular ones. I think I can myself modify the code to accomplish this.

However, if you were able to allow portals in the same floor works, that also will solve my problem. I haven't done the test already, but I try as soon as I can.

dsuarez commented 8 years ago

I have been diving into your code. Now I understand it a little bit more. Path is built as an entity independent of the segments. My idea will not work under this schema.

I tried to modify lines 407 and ids in my map to allow origin and destination (Elev.1.2.floor1 and Elev.2.1.floor1) as "Elev".origin.destination.floor_number. It did not work, maybe some changes are need around 458. Am I right?

Although I can teleport the path between one portal to another, I cannot wonder how to callback functions when a point in the path is reached.