Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
Ouadie
Employee
Employee

If you have worked with point maps in Qlik, you are probably familiar with how selections normally work. You zoom into an area, use the lasso tool to draw around the points you want, confirm the selection, and repeat the process if you want to explore somewhere else.

Qlik Cloud now supports another option for point layers called Auto select visible:
Instead of manually selecting points, you move around the map and Qlik updates the selection based on the area you are viewing. Zoom into Philadelphia and the locations in that area are selected. Pan over to another city and the selection changes with the map.

There is a little more happening behind the scenes, though. Before you turn on Auto select visible, you first need to create a Spatial Index for your location data. In this post, I’ll walk through what that means and how you can try it yourself with a simple example.

What changed?

The idea of selecting visible locations is not completely new to Qlik. Auto Select Visible existed in the GeoAnalytics map extension before it became available in the native Qlik Cloud map.

What changed recently is that you can now use this behavior directly in the native Qlik map chart. You no longer need the old GeoAnalytics map extension, but you still use GeoOperations to create the Spatial Index that the map relies on.

The easiest way to think about the workflow is that there are two parts. During reload, GeoOperations prepares the Spatial Index and adds it to your data model. Once the app is loaded, the native Qlik map uses that index as the user pans and zooms.

What is a Spatial Index?

A Spatial Index is a way of organizing geographic data so Qlik has a more efficient way to understand where points are located.

Imagine a grid placed over your map. Each location belongs to one or more cells in that grid, depending on the level of detail. Qlik creates several levels of these cells so it has smaller cells for detailed views and larger cells for wider geographic views.

When GeoOperations creates the index, you will see fields such as SpatialIndex, SpatialIndexLevel2, SpatialIndexLevel3, and so on. These values represent cells in the spatial grid.

This is useful because Qlik does not need to treat every map movement as a completely new geographic calculation across all of your points. It already has a spatial structure that tells it how those locations are grouped geographically.

Why does this need to happen in the load script?

The reason is that the map setting and the Spatial Index have different jobs. The Spatial Index prepares your location data during reload. "Auto select visible" then uses that prepared information while interacting with the map.

So the Spatial Index is created once when the app reloads instead of being rebuilt every time somebody pans or zooms the map.

GeoOperations connection

You need GeoOperations to create the Spatial Index, but you do not have to build the script manually.

Screenshot 2026-08-07 105002.png

If you create a Qlik GeoOperations connection, you can select Spatial Index from the available operations, choose your fields, and let Qlik generate the script for you. This is probably the easiest option if you are using the feature for the first time.

You can also write the GeoOperations ScriptEval call directly in the Data load editor.

Screenshot 2026-08-07 105356.png

Try it with a simple example

Attached to the post is a QVF that uses a demo dataset containing SiteID, SiteName, Metro, State, Latitude, Longitude, MonthlyRevenue, and Customers.

Step 1: Load the locations

First, upload the CSV into DataFiles in your Qlik Cloud app or space. Then load it using the following script:

Sites:
LOAD
    SiteID,
    SiteName,
    Metro,
    State,
    Num#(Latitude, '0.000000', '.', ',') as Latitude,
    Num#(Longitude, '0.000000', '.', ',') as Longitude,
    Num#(MonthlyRevenue, '0.00', '.', ',') as MonthlyRevenue,
    Num#(Customers, '0', '.', ',') as Customers,
    GeoMakePoint(
        Num#(Latitude, '0.000000', '.', ','),
        Num#(Longitude, '0.000000', '.', ',')
    ) as SitePoint
FROM [lib://DataFiles/qlik_spatial_index_demo_20k.csv]
(txt, codepage is 28591, embedded labels, delimiter is ',', msq);

 

The important part here is SitePoint. Our CSV stores latitude and longitude separately, so GeoMakePoint combines them into the geographic point field we will use on the map and pass to GeoOperations.

Step 2: Create the Spatial Index

Once the Sites table is loaded, we can pass it through the GeoOperations Spatial Index operation.


[SiteSpatialIndex]:
LOAD *
EXTENSION GeoOperations.ScriptEval('
    SELECT
        SiteID,
        SpatialIndex,
        SpatialIndexLevel2,
        SpatialIndexLevel3,
        SpatialIndexLevel4,
        SpatialIndexLevel5,
        SpatialIndexLevel6
    FROM SpatialIndex(
        gridSize="0.002",
        gridWidthHeightRatio="1.5",
        nLevels="6",
        levelFactor="4"
    )
    DATASOURCE dataset INTABLE
        keyField="SiteID",
        pointField="SitePoint",
        crs="auto"
', Sites);

 

The two fields that matter most here are keyField and pointField. SiteID connects the generated index back to the original Sites table, while SitePoint tells GeoOperations which geographic field should be indexed.

For this example, I am also using a gridSize of 0.002. I originally tested the default value of 0.04, but at a detailed street-level zoom it grouped too many nearby locations into the same grid cell. Reducing it to a lower number gave the demo much more precise selections when zooming into individual points.

After the reload, your data model will contain the original Sites table and the SiteSpatialIndex table, associated through SiteID.

Step 3: Create the map

Now add a native Map chart and create a Point layer. Use SiteID as the dimension and SitePoint as the location field.

Once the point layer is working, go into Map settings and change Zoom behavior from Auto zoom to Auto select visible. A Spatial index option will appear underneath it. Select SpatialIndex.

Screenshot 2026-08-07 103850.png
Screenshot 2026-08-07 103859.png

At this point, start zooming and panning around the map. Qlik will update the selection as the visible area changes.

Auto zoom versus Auto select visible

It is also worth understanding how this differs from the default Auto zoom behavior.

With Auto zoom, you make a selection somewhere in the app and the map moves to show the selected locations. Auto select visible works in the opposite direction. You move the map yourself, and the map view drives the selection.

Why might I see more selected sites than visible points?

Spatial Index selections work with grid cells, not individual screen pixels. If several locations fall inside the same spatial index cell, those sites can all become associated with the selection even when only one point appears inside a tightly zoomed map view.

That is where gridSize becomes important. A larger grid size creates larger cells, which is useful when users normally work at wider geographic views. A smaller grid creates more detailed cells and gives you more precise behavior when users zoom down to individual streets or locations.

I attached the sample CSV and complete load script so you can try the same setup in your own Qlik Cloud tenant.

Thank you for reading!