Forum Discussion
Which visual for polylines and points
- 1 year ago
Hello FoolzRailer1,
You are absolutely right when rivers are placed in the Position layer, Azure Maps aggregates the latitude/longitude values, which is why the geometry collapses into single points.
This happens because Azure Maps treats the Position layer as point data unless you provide WKT geometry. By putting the river WKT directly into the Location (WKT) field, the full line geometry is preserved and remains interactive.
So in short:
-
Reference Layer → correct river display, but static (no tooltips/filtering).
-
Data Layer (WKT) → keeps rivers dynamic and interactive, avoiding the averaging issue.
That’s the tradeoff depending on whether you need static background context or interactive visuals.
we’re glad the issue is now resolved after you added the rivers as a reference layer.
Really appreciate the effort you put into testing different approaches and sharing the screenshots back here. it helps make the discussion clearer and useful for others who may face a similar scenario.
Best regards,
Ganesh Singamshetty -
This is a one-time setup process. Once complete, you can refresh your data without repeating these steps.
Step 1: Convert Your Shapefile (.shp) to WKT
You'll need a standard Geographic Information System (GIS) tool for this conversion. QGIS is a free, open-source, and industry-standard tool that is perfect for this.
Open in QGIS: Add your river Shapefile to a new QGIS project.
Export as CSV: Right-click on your river layer in the Layers panel, then go to Export > Save Features As...
Set Export Options:
Format: Comma Separated Value [CSV]
File name: Choose a location to save your new CSV file.
Layer Options > GEOMETRY: In the dropdown, select AS_WKT. This is the most important setting.
This process will create a CSV file containing all the data associated with your rivers, plus a new column (usually named WKT) that holds the geometry for each river as a LINESTRING(...).
Step 2: Load Your Data into Power BI
Get Data: In Power BI, connect to the CSV file you just created for your rivers.
Get More Data: Also, connect to your other data source that contains the outlet points. This table must have separate columns for Latitude and Longitude.
Step 3: Configure the Azure Map Visual
Add the Azure Map visual to your report canvas.
With the visual selected, configure the Fields pane:
Location (for Rivers): Drag the WKT column from your rivers table into this field well.
Latitude (for Outlets): Drag the Latitude column from your points table here.
Longitude (for Outlets): Drag the Longitude column from your points table here.
Step 4: Add and Format Your Layers
This is where you bring the map to life. Go to the Format your visual (paintbrush icon 🖌️) pane.
Set the Map Background: Go to Map settings > Style and select Satellite or Satellite road labels to get the aerial view.
Enable the Line Layer (Rivers):
Go to the Line layer card and toggle it On. Your rivers should now appear on the map.
Inside this card, you can use the Colors section to set a single color or click the fx button to apply conditional formatting based on another data field.
Enable the Point Layer (Outlets):
The map will likely default to showing your points as a bubble layer. Go to the Bubble layer card to format them.
Just like the line layer, you can go into the Colors option to set a single color or apply data-driven conditional formatting.
By following these steps, you will have a single map visual that dynamically displays both your river polylines and outlet points, with each layer independently colored based on your data.
If this explanation and solution resolve your issue, please like and accept the solution.
- FoolzRailer11 year agoFrequent Visitor
Thank you for the quick reply.
I've tried your suggestion, however adding something to Location while also having something in Latitude and Longtitude gives an error suggestiong I remove one of the items.
Also, when adding the WKT file in Location it shows up as two dots in France for some reason, however adding it as a reference layer it shows up correctly in Denmark just as it should. However as a reference layer I can't show information or anything else with the Rivers.