@Mintz Both of the UK maps seem to have stopped working for no apparent reason and after no changes to my lookml. I checked in with a looker wizard, we validated the Lookml matches to this post and we tested the API connection multiple times, but all that seems to pull through is a grey map (below).
It might be a problem with the underlying URL?
Could you look into this?
Working all right for me:
We’re on 21.6.27
Having trouble getting it working if someone could help.
Trying to get the map_layer: us_zip3 working.
- I have a manifest file in the highest project directory. Replaced the “[token]” with “xxxx” removing the square brackets.
- I have the code above in the model file
- Replaced
@{mapbox_api_key}with the access token xxxxx
- Replaced
- Then in the relevant view, I tried adding a dimension
I’ve tried a few combinations like:
dimension: us_zip3 {
type: zipcode
label: “Zipcode (3 digit)”
description: “Just the first 3 digits can be useful for visiual charts”
group_label: “Shipping Address”
map_layer_name: us_zip3
sql: LEFT(${TABLE}.zip_code,3) ;;
}
dimension: us_zip3 {
type: string
label: “Zipcode (3 digit)”
description: “Just the first 3 digits can be useful for visiual charts”
group_label: “Shipping Address”
map_layer_name: us_zip3
}
dimension: us_zip3 {
type: zipcode
label: “Zipcode (3 digit)”
description: “Just the first 3 digits can be useful for visiual charts”
group_label: “Shipping Address”
map_layer_name: us_zip3
sql: ${TABLE}.zip_code ;;
}
Only when I do the last option does the map show values, but it just shows the 5 digit zip values.
Show us your data and the map’s preview data as well
what dimension type should I be using for the us_canada_postal_codes map layer? I’m currently doing this:
dimension: address_fsa {
label: “Address FSA/Zip Code”
map_layer_name: us_canada_postal_codes
description: “The FSA/Zip Code of the match.”
group_label: “Location Details”
type: zipcode
sql: ${TABLE}.address_fsa ;;
}
and it’s only capturing zipcodes and not fsas on the map
I am facing a similar issue. I initial thought type should be “us_zip3” but no luck! Leads appreciated!
FYI > Added “map_layer_name: us_zip3” and it worked like a charm.
Refer to this documentation for additional details: https://docs.looker.com/reference/model-params/map_layer
Hi
I followed the instructions, added the manifest and added below to my model file
map_layer: canadian_provinces {
format: "vector_tile_region"
url: "https://a.tiles.mapbox.com/v4/looker-maps.oh_canada/{z}/{x}/{y}.mvt?access_token=@{mapbox_api_key}"
feature_key: "provinces"
extents_json_url: "https://rawcdn.githack.com/dwmintz/looker_map_layers/c98a443cfd7dc93191a3f3f6c54059b9a35a9134/canada_provinces.json"
min_zoom_level: 2
max_zoom_level: 10
property_key: "PRENAME"
}
Then added this to my view
dimension: transaction_province {
type: string
map_layer_name: canadian_provinces
group_label: "Transaction Province Name"
group_item_label: "Transaction Province Name"
sql: ${transaction_province_full_name} ;;
}
In the dashboard it shows the map but doesn’t show anything on it