Optimization and Tuning

Techniques for tuning search, routing graph configuration, and IndoorRenderer behaviour.

This page collects tuning techniques grouped by the component they apply to.

Applies to: IndoorService (search, autocomplete)

Both IndoorService.search() and IndoorService.autocomplete() accept an advancedFilter string to narrow results. Use it to restrict which POIs are returned — for example, to show only a specific category or a subset of floors.

javascript
        // Return only cafes and restaurants
indoorService.search(
  venueId,
  query,
  (results) => {
    /* handle results */
  },
  null, // ref
  null, // id
  "amenity:cafe OR amenity:restaurant" // advancedFilter
);

    

The same advancedFilter argument is available on autocomplete() with identical syntax.

Routing Graph Configuration

Applies to: venue GeoJSON data

Routing behaviour is controlled by properties set on pathway features in your venue GeoJSON, not at runtime. Changes require re-uploading the venue file via the Woosmap Console.

Routing Profiles

Assign paths to one or more profiles to control which users can traverse them. Common profile values include valid, wheelchair, staff, premium, security, emergency. Separate multiple values with a semicolon.

Basic example:

JSON
        {
  "properties": {
    "highway": "footway",
    "woosmap:routingprofile": "wheelchair;valid"
  }
}

    

Restricted areas — Limit a path to authorised users only:

JSON
        {
  "properties": {
    "highway": "footway",
    "woosmap:routingprofile": "staff",
    "access": "private"
  }
}

    

Accessibility

Mark features as wheelchair-accessible so the wheelchair routing profile can route around stairs:

JSON
        {
  "properties": {
    "amenity": "toilets",
    "wheelchair": "yes"
  }
}

    

Include all elevators and ramps in the routing graph and assign them at least the valid profile. Stairs and escalators should not carry the wheelchair profile.

IndoorRenderer Configuration

Applies to: IndoorRenderer and IndoorWidget (via rendererOptions)

Pass an options object to control how the renderer initialises and behaves. All properties are optional.

javascript
        const renderer = new woosmap.map.IndoorRenderer({
  venue: "my_venue", // Set the default venue to display
  defaultFloor: 0, // Open on ground floor
  centerMap: true, // Fit the map to the venue on load
  snapToVenueBounds: true, // Snap back to venue if user pans away
  hideLevelSelector: false, // Keep the floor level selector visible
  showRoutingPaths: false, // Hide the routing graph overlay
  forceExtrusion: false, // Only extrude walls when zoomed in
  useInfoWindow: true, // Show an info window when a POI is tapped
});

    

For the full list of accepted properties, see IndoorRendererOptions.

Debouncing Autocomplete

Avoid firing a search on every keystroke by waiting until the user pauses typing:

javascript
        let searchTimeout;

function handleSearchInput(query) {
  clearTimeout(searchTimeout);
  searchTimeout = setTimeout(() => {
    indoorService.autocomplete(venueId, query, (predictions) => {
      displayPredictions(predictions);
    });
  }, 300); // wait 300 ms after the user stops typing
}

    
Was this helpful?