Home Big Data Construct multi-layer maps in Amazon OpenSearch Service

Construct multi-layer maps in Amazon OpenSearch Service

Construct multi-layer maps in Amazon OpenSearch Service


With the discharge of Amazon OpenSearch Service 2.5, you’ll be able to create maps with a number of layers to visualise your geographical information. You possibly can construct every layer from a unique index sample to separate information sources. Organizing the map in layers makes it extra easy to visualise, view, and analyze geographical information. The layering additionally helps fetch information from numerous sources, view completely different information at completely different zoom ranges, and repeatedly refresh information for a real-time dataset. Moreover, in OpenSearch 2.6, you’ll be able to add multi-layer maps to dashboard panes inside OpenSearch Dashboards, which makes it extra easy to research your geospatial information within the context of different visualizations. OpenSearch Service provisions all of the assets in your OpenSearch cluster so you’ll be able to deal with constructing the enterprise worth by maps and different options of OpenSearch slightly than spending time managing your deployment.

On this put up, we present easy methods to use multi-layer maps in OpenSearch Service.

Answer overview

The multi-layer map helps customers visualize information and achieve insights utilizing particular layers and zoom ranges to assist emphasize key messages. For our use case, we use multi-layer maps to assist an instance real-estate software. Your index may have fields equivalent to location, deal with, availability, variety of bedrooms, worth, and extra. Initially, we develop a map with state boundaries with aggregated information for an summary. Because the consumer zooms in, they’ll see metropolis boundaries and postal codes. Because the consumer continues to zoom, they’ll see every home with info like the worth, variety of bedrooms, and so forth. You’ll construct numerous information layers from completely different information sources to perform this job. You can even add filter queries; for instance, to solely present properties which can be out there.


Full the next prerequisite steps to configure the pattern information:

  1. Create an OpenSearch Service area (model 2.7 or larger).
  2. Obtain the file bulk_request_realestate.txt.
  3. Copy and paste your entire contents of the downloaded file into the OpenSearch Dashboards console.
  4. Run the instructions.

These instructions create the realestate index and add data into the catalog.

Now let’s visualize this information in a multi-layer map.

Add layers

To create your map and add layers, full the next steps:

  1. On OpenSearch Dashboards, within the navigation pane, beneath OpenSearch plugins, select Maps.
  2. Select Create map.

You will notice a default map (or basemap) loaded on the web page with a Layers pane on the left. This serves as a canvas for the info. The OpenSearch basemap makes use of vector tiles, leading to faster loading speeds and seamless zooming in comparison with raster tile maps. It successfully accommodates zoom ranges starting from 0–22. 0 is essentially the most zoomed out with the worldwide view, and zoom stage 22 is roughly a half-inch per pixel decision. Any extra layers you add will seem on this pane.

  1. Select Add layer.
  2. Within the immediate, select the choice so as to add paperwork for the info layer.
  3. Beneath Paperwork, select the index you created (realestate) as the info supply.
  4. For the geospatial discipline, select the sector containing geopoints (equivalent to location on this instance).
  5. Hold the remaining settings at their default values, then select Replace.

Within the Layers pane, a newly generated layer named New Layer 2 shall be seen. Moreover, you’ll observe the presence of all geopoints on the map (inexperienced dots within the following screenshot).

Replace the layer identify and allow tooltips

For an summary of the varied configuration decisions accessible for the layers, select New Layer 2. This motion opens one other pane containing three tabs: Information, Fashion, and Settings. Let’s modify the layer’s identify to one thing extra related and allow tooltips. Full the next steps:

  1. On the Settings tab, substitute New Layer 2 with realestate-data within the Identify discipline.
  2. On the Information tab, scroll all the way down to Device ideas, and choose Device ideas.
  3. Enter area because the tooltip.
  4. Select Replace.

The altered identify ought to now be seen within the left pane. The geopoints themselves don’t convey any info. Nevertheless, with tooltips enabled, you’ll be able to entry complete info relying on the fields chosen. As you hover over the geopoints, you’ll observe the chosen tooltip info—on this occasion, area CA.

Regulate zoom ranges

The essence of this performance lies within the potential to watch your information by distinct layers at various zoom ranges. To realize this, generate a layer utilizing the identical course of as earlier than. The next instance exhibits a brand new layer (locality) that includes tooltips displaying locality and postal code. You can even select the colour of your geographical factors on the Fashion tab. On the Settings tab, you’ll encounter choices for zoom ranges, permitting you to enter minimal and most values—like 4 and 6, as an example. Consequently, this means that the layer shall be seen solely inside this vary of zoom ranges.

Within the Layers pane, you’ll be able to observe three layers alongside the locality layer created within the earlier step. A notification will point out “Layer is hidden exterior of zoom vary 1-2.” This layer turns into seen as you zoom in.

The realestate-data layer is about with a default zoom vary of 0–22, making certain visibility throughout all ranges except manually hidden. The locality layer is configured to be seen solely inside the zoom vary of 1–2.

As proven within the following screenshot, the tooltip for the realestate-data layer stays seen even after the fourth zoom stage. To entry the tooltip info for the locality layer, select the attention icon subsequent to realestate-data to manually conceal this layer. As soon as accomplished, hovering over the geopoints will reveal the tooltip particulars for locality (postal code and locality).

The next are some key factors to contemplate:

  • Every layer will be established with distinct colours for its geographical factors. For example, the realestate-data layer is depicted in inexperienced, whereas the locality layer makes use of orange.
  • It’s doable to watch geopoints in a coloration that wasn’t straight chosen. Within the following screenshot, brown is seen as a result of overlapping of two layers on the similar zoom stage.
  • You possibly can observe the colour shift to the layer’s designated coloration—orange—after realestate-data is manually hidden, as a result of there’s not an overlap between the layers.

You possibly can generate an extra layer designed to show tooltip information such because the depend of beds, baths, worth, and sq. footage. This layer shall be lively inside the zoom vary of three–4.

To save lots of your undertaking, select Save. Enter a title, equivalent to realestate-multilayer-map, then select Save once more. Your multilayer map is now efficiently saved!

Exploring the multi-level map

After you could have established all of the layers, be aware of how the layers turn into seen or invisible at every zoom stage. Observe the dynamic changes in tooltip info that correspond to those adjustments as you zoom.

Add a filter

After you could have generated a number of layers and efficiently visualized your geopoints, you may discover that you’re excited about particular properties, equivalent to inside a specific worth vary.

So as to add a filter at layer stage, full the next steps:

  1. In the proper pane, on the Information tab, select Filters.
  2. Enter worth because the filter standards.
  3. Choose is between because the operator.
  4. Enter 800000 for the beginning of the vary and 1400000 for the top of the vary.
  5. Select Save to replace the layer.

You’ll instantly observe the filter taking impact, ensuing within the show of solely the related information matching the filter.

An alternate technique to determine a filter entails drawing shapes on the map, equivalent to rectangles or polygons. On this occasion, you’ll be using the polygon possibility. (For API-based filtering, check with APIs).

  1. Select the polygon icon on the proper aspect of the map.
  2. For Filter label, enter a reputation for the filter.
  3. Draw the form over the map space that you simply need to choose.
  4. For a polygon, choose any start line on the map (this level turns into a polygon vertex) and hover (don’t drag) to every subsequent vertex and choose that time.
  5. Make sure that to pick out the start line once more to shut the polygon, as proven within the following screenshot.

Add a map to a dashboard

You possibly can add this map to an present or a brand new dashboard. Full the next steps:

  1. On OpenSearch Dashboards, select Create and select Dashboard.

  1. Choose Add an present dashboard.
  2. Select realestate-multilayer from the checklist.

You possibly can see the brand new visualization in your dashboard.

  1. Select Save and enter a title for the dashboard.


On this put up, you successfully established multi-layer maps for information visualization, analyzed geographic information, noticed numerous information at various zoom ranges, added tooltips for supplementary information visualization, and added multi-layer maps to dashboard panes inside OpenSearch Dashboards to simply analyze your geospatial information. Discuss with Utilizing maps for another use case and detailed details about map options.

Concerning the authors

Aish Gunasekar is a Specialist Options Architect with a deal with Amazon OpenSearch Service. Her ardour at AWS is to assist clients design extremely scalable architectures and assist them of their cloud adoption journey. Outdoors of labor, she enjoys climbing and baking.

Satish Nandi is a Senior Technical Product Supervisor for Amazon OpenSearch Service.

Jon Handler is a Senior Principal Options Architect at Amazon Internet Companies primarily based in Palo Alto, CA. Jon works carefully with OpenSearch and Amazon OpenSearch Service, offering assist and steering to a broad vary of shoppers who’ve search and log analytics workloads that they need to transfer to the AWS Cloud. Previous to becoming a member of AWS, Jon’s profession as a software program developer included 4 years of coding a large-scale, ecommerce search engine. Jon holds a Bachelor of the Arts from the College of Pennsylvania, and a Grasp of Science and a PhD in Pc Science and Synthetic Intelligence from Northwestern College.



Please enter your comment!
Please enter your name here