Change the appearences of map items recieved from a FeatureCollection

I am getting multiple polygons from a GeoJson URL and would like to change the properties of the polygons.
I would like to change the transparency the color, and the infobox title and description. I however do not know how to do this, or if it's even possible.

Here is the URL I am trying to receive data from:


Welcome Adam.

Here is an example tutorial that does some of these things with a json file

This example uses json files similar to your NOAA json. You would do something similar.


Your first step is to load the json into your Map component and display it.

Did it help?

Hello, thanks for the quick response! I was successful in loading the Json onto the map and changing the color of all the polygons, but I want to change the color based on the outlook. In the provided Json, there is a part that says "'OUTLOOK': 'MARGINAL (AT LEAST 5%)'". Is there any way to do an If statement based on this?

Congratulations Adam, yes that should look something like this

Yes. Extract the json Outlook and based on NOOA keywords associated with the particular polygon, then color the polygon appropriately. There is probably one Outlook keyword associated with any polygon This is a bit more difficult. If keyword is xxxx then Polygon1.FillColor = green might do it.

for the 1st polygon, it is one of these:
"type": "Feature", "properties": {"dn": 1, "PRODUCT": "Day 1 Excessive Rainfall Potential Forecast", "VALID_TIME": "22Z 09/21/22 - 12Z 09/22/22", "START_TIME": "2022-09-21 22:19:00", "OUTLOOK": "Marginal (At Least 5%)", "Snippet": "22Z 09/21/22 - 12Z 09/22/22", "ISSUE_TIME": "2022-09-21 22:19:00", "END_TIME": "2022-09-22 12:00:00"}},

I'm pretty new to this stuff, but what you did in the emulator Is exactly what I would like to do. Could you tell me how you did this?

Already provided a tutorial that shows how. :slight_smile:
What particularly are you having difficulty with.

You can change the Polygon properties using the tools in Polygon

Hello, I may have been confusing with my words earlier, when I said "I changed the color of all the polygons", I meant that I could only change all of them to 1 color, not the color individually.

You can do this in the Designer by setting the Polygon1,2 and 3 each to a color you like or you can do this with Blocks. Here is an example changing only Polygon1 to light blue.


Sorry if this sounds stupid, but how do I reference polygon 1 if it has not been created yet (I'm loading from a Web component)

The polygons in a FeatureCollection might be named or might not. If the json names them (possibly this bit {"dn": 1, "PRO...) you know which polygon are named as you see them in the FeatureCollection1.Polygon1, Polygon2, and Polygon3. I think the number assigned is the order they occur in the json. Good question; I am not sure how you know which is which polygon associated with the key words other than by parsing the json. The first set of weather data in this case is that associated with the first set of polygon coordinates.

I would have to think about how you could determine which data set belongs with each polygon ahead of time and how you could know how many polygons are rendered. :cry:

I loaded the json as a file. When it loads, the json polygon parameters display so I know there are three polygons in this example json Feature-Collection.

I know that the provided Json has everything for that Outlook category above where it's mentioned in the text, and below the next/previous category.

Hurricane Ian:

Solution using idea for ABG's json shredder for the Text information.

1 Like

@SteveJG That's actually pretty cool. @robert_parks you should take a look at this as you're thinking about data-related projects.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.