Making a Smart 3D City with On Click and Services

If your 3D City Model uses proper IDs for each building/object, you can turn it into a “Smart 3D City” within minutes using the new On Click action for building objects. 

Step-by-step

Here’s what you need to do to create a Smart 3D City in OpenCities Planner:

  1. Open the Properties Window of your building set object in Object Manager
  2. Go to the On Click tab and choose the Embed Code action
  3. Use the predefinded variable $OBJECTID to get the ID of the active object

In order to do something useful, you would likely need a backend service that you can query with that ID.

In the screenshot example, the National Survey Agency’s REST API for building information was used to fetch relevant building data which is then displayed as HTML.

In the embed code text box, the query string is as simple as: http://urltoservice.com/servicename/$OBJECTID

On Click Info
Configuration of the On Click tab

Here are a few ideas on how to use it

  • Building information queries
  • Fault reporting on trees, lamp posts, buildings, etc
  • Crowdsource building information

There are a lot more potential use cases, too. If you come up with something clever, we’d love to see your project. Send us feedback.