Forum Discussion

m_cherriman's avatar
m_cherriman
Advocate I
3 years ago

GeoJSON reference layer - location labels/names

Hi,

 

I'm using an Azure maps visual with a GeoJSON reference layer which is showing red dots for distribution centres, which is great.  But what I also need is to show is the centre name.  I've added the name and label options to my GeoJSON file, but they don't pull through.

 

is this even possible?

 

TIA

14 Replies

  • It is possible with TopoJSON formats, should be possible with GeoJSON too.  Check your file in Mapshaper.org, maybe you inadvertently dropped the attribute during the transform.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi

    New to mapping in PBI... I've got a GEOJSON file I'm overlaying on top of some "other" school location data. The GEOJSON file has our "home" schools in and it shows as red dots fine, but how do I get the name of home schools in the GEOJSON file to show? As tooltips or something? Importing to MapShaper and it's recognising the name / number of students etc fine.

    Don't believe we can use th ArcGIS visual, just yet. Thought the reference layer should do this?

    Cheers

    Keith

    • lbendlin's avatar
      lbendlin
      Super User

      Make sure you don't strip out the polygon attributes when exporting to TopoJSON in MapShaper.

      • Anonymous's avatar
        Anonymous
        Not applicable

        Thanks for the reply! Ok, several questions...

        For the fictious locations, I want 2 points (Lat / Lon / name changed etc) and I have this as GeoJSON and TopoJSON (seems to be little difference? and isn't a polygon, points are fine / basic)

        {
        "type": "FeatureCollection",
        "features": [
        {
        "type": "Feature",
        "properties": {
        "color": "Red",
        "name": "LBR1"
        },
        "geometry": {
        "coordinates": [
        -0.087724,
        51.507904
        ],
        "type": "Point"
        },
        "id": 0
        },
        {
        "type": "Feature",
        "properties": {
        "color": "Red",
        "name": "LBR2"
        },
        "geometry": {
        "coordinates": [
        -0.087724,
        51.507904
        ],
        "type": "Point"
        },
        "id": 1
        }
        ]
        }

         

        As far as I understand it, I can drop this in as a reference layer and this works showing 2 red dots, but how would I get the name to show (all the time / on hover) or something? Unless I'm missing the point of reference layers... I'd basically like a layer where nothing changes (Home layer) and then dynamic data I can slice 'n' dice. Thoughts welcomed! Cheers Keith

  • {"type":"FeatureCollection","features":[{"type":"Feature","properties":{"name":"locationA","latitude":"39.142475600","longitude":"-94.576185800"},"geometry":{"type":"Point","coordinates":[-94.576186,39.142476]}},{"type":"Feature","properties":{"name":"locationB","latitude":"39.213128600","longitude":"-94.464780200"},"geometry":{"type":"Point","coordinates":[-94.46478,39.213129]}},{"type":"Feature","properties":{"name":"locationC","latitude":"39.214377000","longitude":"-94.463564000"},"geometry":{"type":"Point","coordinates":[-94.463564,39.214377]}}]}
      • jusTodd's avatar
        jusTodd
        Advocate IV

        Thanks lbendlin!  I see what is happening now.  I still cannot get it to work in the "Azure Maps" visual, but it works perfectly over in the "Shape Map."  I appreciate your taking time on this.