Closed codewithtyler closed 8 years ago
So the way we allow styling for any GeoJSON file is to add specific style parameters when you define the layer in GeoQ. When defining a GeoJSON layer using the 'Add Layer' function, after adding the name, type, and url in the web page, select the "extended form options" and go down to the "Layer params" text entry area. This area allows the entry of a json object describing the layer, including style. So for example, to style a line, add the following to the Layer params area:
{ "style" : { "color" : "blue", "weight" : 2, "opacity" : 0.5 } }
@mjcarroll is this what you did when you tried to change the color of the line?
I'm pretty sure that this is what I tried. When I styled the line to "red", it actually showed as "blue". I can take another look at the JSON files I was using and report back.
While using GeoQ during the GEOHackHSV hackathon event we attempted to plot some linestrings using the geojson files below. However, the map used by geojson has white roads and the LineString being generated is also white. This makes it really hard to see the line. We tried to change the line color to red, but the the line was generated it showed up as blue. The next time we tried loading the map the line turned white again. We were never able to figure out how to get the line to stay the color we wanted.
First geojson file
2nd geojson file
3rd geojson file