Hello There,
I am working on map where is I have successfully added the different points fetching it from Database. I am going through this Manual Page (Perspective Map - Adding GeoJSON Shapes - Ignition User Manual 8.1 - Ignition Documentation ) of adding points for reference. But the issue is my Pointers are not added with "Blue" color. All are in "Black" color.
What is wrong I am doing here?
Attaching SS for reference.
It looks OK to me (but is hard to read). Can you post a section of the resulting JSON for one of the points?
Tip: post formatted code - not pictures of code. We would have to type out your script to test it.
This thread is intended as a short help file for all those struggling to post formatted code on the forum.
Posting formatted code on the forum (and most others) is as simple as selecting the code and pressing the </> button. It works the same as applying Bold or Italic styles to your document. It preserves indentation and applies syntax highlighting.
[How to post code]
Here is the code.
`{`
` ` `"type"` `: ` `"Feature"` `,`
` ` `"properties"` `: {},`
` ` `"geometry"` `: {`
` ` `"type"` `: ` `"Point"` `,`
` ` `"coordinates"` `: [`
` ` `-` `121.16945743560791` `,`
` ` `38.6632293081453`
` ` `]`
` ` `},`
` ` `"marker"` `: {`
` ` `"icon"` `: {`
` ` `"color"` `: ` `"blue"` `,`
` ` `"size"` `: {`
` ` `"width"` `: ` `100` `,`
` ` `"height"` `: ` `100`
` ` `},`
` ` `"path"` `: ` `"material/location_on"`
` ` `},`
` ` `"tooltip"` `: {`
` ` `"content"` `: {`
` ` `"text"` `: ` `"Some text"`
` ` `}`
` ` `}`
` ` `}`
`}`
It appears that you have just copied and pasted the sample code from Perspective Map - Adding GeoJSON Shapes - Ignition User Manual 8.1 - Ignition Documentation into your answer above. We need to see the result of your script.
Please preview the code / JSON to check that it is formatted correctly before hitting reply. (The JSON in your last post is a mess.)
It seems the example isnt working anymore, idk what has changed
instead of using color, you can use style fill though
"style": {
"fill": "blue"
}
1 Like
Thanks victordcq!! it worked!!
Would it be a good idea to set both fill
and color
in case something gets "fixed" in a later version? I'd ask support for clarification.
2 Likes