Replies: 2 comments 6 replies
-
You shouldn't have to supply |
Beta Was this translation helpful? Give feedback.
-
Thanks for that, it worked for me. I have got yet another issue. I have another GeoJSON layer which only contains Points and when I supply it to GeoJSON layer it doesn't show anything even though in dev tools I can see the the DeckGL layer state has the points feature in it. I'm getting the data from an API and putting it into my state which I then pass to the GeoJSON layer. I checked and its valid geojson as well printed on the console for you to check. Screenshot below: Tried with subLayer as well as doing it through a local geojson file but no luck.
Dev Tools: https://imgur.com/0kKrskS Please let me know how I can fix this. Thank you |
Beta Was this translation helpful? Give feedback.
-
Hello,
I've followed the example in the documentation to use IconLayer to render the point features in a GeoJsonLayer. However it refuses to display the icon even if I'm supplying getPosition to it:
points:{ type: IconLayer, iconMapping: ICON_MAPPING, getIcon: 'https://i.imgur.com/GWqT1PQ.png', getPosition: (d) => d.features.map(geo => geo.geometry1.coordinates), getSize: 32, }
At the sametime, 'polygons-fill' subLayer works perfectly fine. One thing to note is, my points are supplied in the 'geometry1' object in my geojson file. But it should still works, since I'm giving it a getPosition but it doesn't. Can you please help me with it?
Sample of geojson:
{ "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {..}, "geometry":{..}, "geometry1":{..} } ] }
Beta Was this translation helpful? Give feedback.
All reactions