-
-
Notifications
You must be signed in to change notification settings - Fork 40
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to add properties to a Feature #57
Comments
@viktorsmari currently @BuonOmo since you're more familiar with the GeoJSON library do you have any thoughts about this? |
@keithdoggett I don't see any issue per specification, properties is defined as any json object (https://datatracker.ietf.org/doc/html/rfc7946#section-3.2). However, I think this was made that way for a reason, we can see comments by Tee and Daniel insisting on the fact that it is a copy. I'm not so sure why.. rgeo-geojson/lib/rgeo/geo_json/entities.rb Lines 38 to 46 in e5de86e
Basically my opinion is that it would be ok to not return a duplicate because the In the mean time @viktorsmari you can just override the class RGeo::GeoJSON::Feature
def properties
@properties
end
end |
Thanks @BuonOmo! Would you recommend putting this in an |
@viktorsmari It has been a while since I haven't had an issue with rails' reloading system, so I'd say why not. If you end up with something failing, you can also consider putting that in you The best way to see if it works is to try: |
How can I add more items to a Feature property Hash?
Using
merge!
does not seem to workWhich works in a 'normal' Hash
The text was updated successfully, but these errors were encountered: