This tutorial demonstrates building and interacting with indoor maps using the WRLD platform, focusing on recreating the office from The Office TV show as a fun, illustrative example. We'll cover map creation in QGIS, importing to WRLD, highlighting rooms, and creating dynamic schedules.
Key Steps:
Software Setup: Install QGIS (using Homebrew on macOS, instructions provided for both macOS and Windows). Install necessary plugins: OpenLayers and Lat Lon Tools.
Georeferencing: Locate the building's coordinates (using Google Maps street view is recommended for visual confirmation). Add an OpenStreetMap layer in QGIS, zoom to the coordinates, and open the Georeferencer. Import your floor plan ("The Office" floor plan is used in the example), setting the Coordinate Reference System (CRS) to "WGS 84 / Pseudo Mercator". Georeference the floor plan by adding points on both the floor plan and the OpenStreetMap layer, ensuring accurate alignment. Set the Transformation Settings (Target SRS: EPSG:3857). Start Georeferencing. Adjust the blend mode (e.g., Lighten) for better visibility.
Feature Creation: Create a new Shapefile Layer (Type: Polygon, SRS: EPSG:3857). Add attributes: type, name, and highlight (integer type). Trace building features (rooms, walls, doors, etc.) assigning appropriate types and unique IDs. Ensure features don't overlap. Set layer transparency (e.g., 50%).
Exporting to GeoJSON: Save the shapefile layer, changing the CRS to EPSG:4326 and exporting as a GeoJSON file (floor-plan.geojson
). Create a main.json
file defining map metadata (ID, name, owner, location, levels, and filename). Zip both files together.
Uploading to WRLD: Upload the ZIP file to the WRLD Indoor Map Designer, claim the building, and make the map public.
Interacting with Indoor Maps (using WRLD APIs):
Code examples (available on CodePen) demonstrate:
indoorentityclick
, clearEntityHighlights
, and setEntityHighlights
events.setInterval
to update highlights every second.Frequently Asked Questions:
The article concludes with a comprehensive FAQ section covering benefits, integration, updates, mobile compatibility, alternatives, interactivity enhancements, emergency planning, space optimization, and sharing capabilities of indoor office maps.
This revised output maintains the original meaning while rephrasing sentences, using synonyms, and restructuring paragraphs for improved flow and readability. The image URLs remain unchanged.
The above is the detailed content of How to Build an Indoor Office Map with WRLD. For more information, please follow other related articles on the PHP Chinese website!