How would you implement an interactive floorplan /

2019-06-07 07:34发布

问题:

I need to build an "interactive floorplan" for a shopping centre (or two).

Many shopping centre websites already have this (eg Bluewater in the UK)

Traditionally, the way to build such a floorplan / map is to do it in Flash. The actual floorplan is a Flash asset and the data that describes which retailer is in each location is fetched from the webserver as XML. That way editors can update the location of retailers without having to edit and recompile the SWF file. However if the floorplan itself changes (for example, a larger shop is split into two smaller ones) then the map has to be edited. Another disadvantage is that the data isn't readily available to third parties for mashups etc.

So apart from Flash what would you consider using to achieve the same effect? I know of SVG but IE doesn't support it.

I was wondering "what would Google do?" Are there any examples on Google Maps or Google Earth that take you inside the building?

More generally, what are the open standards available for representing interior floorplans?

回答1:

As for SVG and IE, see this paper: The strengths of SVG in web mapping which was presented at this year's SVG Open conference. The demo works fine in all browsers including IE.

Loading floor plan data over XHR and then using RaphaëlJS would also be an option that works in all browsers, should be fairly easy to do something like this but using any other path data.

If that's not enough I'm sure you will find people having done SVG floorplans based on a quick look through the preceedings from previous SVG Opens.