Closed (fixed)
Project:
Views GeoJSON
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Task
Assigned:
Unassigned
Reporter:
Created:
21 Dec 2014 at 13:28 UTC
Updated:
13 Jun 2016 at 08:14 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #1
basvredelingComment #2
polI think your patch is incomplete :)
The function to beautify the json is missing.
Comment #3
basvredelingI don't really know what happened there. JSON beautification applies to the preview and "page" output only. Not to feeds. Hence it was probably temporarily taken out. Anyhoo, this is the latest patch.
Comment #4
polErm I think there's a problem with your patch... Check the .module file, the hooks views_geojson_views_api,views_geojson_ctools_plugin_api are missing, the function _views_geojson_encode_formatted is missing too.
Plus, there's a class in that file.
Comment #5
basvredelingYes, sorry, I see what you mean. I accidentally copied the contents of the views_plugin bbox filter file to the module file.
This patch should be correct.
Comment #6
basvredelingIf I include the new views_geojson.nicejson.inc that is.
Comment #7
polThose changes seems to be ok in general, but it includes a new alter function already discussed #2332221: alter json content.
Also the file with the nicejson functions should be named like this: views_geojson.helpers.inc.
Comment #8
basvredelingI'm not sure what you mean by: #2332221: alter json content
The patch there is not included in my update. Could you clarify?
I've renamed the include though. Here's the updated patch with helpers.inc
Comment #9
polHello,
This bit of code worries me:
It has performance implications and I'm not sure that I want to have it in.
Comment #10
basvredelingRight, right. I see. The alter hook is in because of geocluster suggested patch. I thought it would do little harm to performance if no _views_geojson_render_fields_alter hooks are implemented. But I agree it's a different issue. I'll remove it from the patch and discuss it in #1799870: Add hook views_geojson_feature_alter. Also there is this issue awaiting review #2370471: Make patching Views GeoJSON obsolete. I'll test that too.
Comment #11
basvredelingMerged cleanup code from #1641870: Bounding Box support with Search API views into this new patch.
Comment #12
polHello Bas,
Thanks for your patch.
The function
_views_geojson_encode_formatted()is still missing.Could you update it so I can commit it ?
Comment #13
basvredelingI really need to evaluate the way I create my patches. This is the second time the .helpers.inc is not included in the patch.
Anyhoo, here goes. I believe this new one is correct.
Comment #14
polI suggest you to use PHPStorm for a better visual experience with Git !
I'll commit your patch as soon as I'm back home.
Thanks again !
Comment #15
basvredelingActually, I do use PHPStorm. But the patches it outputs are not digested by the Drupal test bots. So I reverted back to command line.
Changed the status since you promised to commit in #14
Thanks very much!
Comment #17
polIt tooks time but it's in now.
Thanks !
Tips for the next time, split your patch in different sub-issue so it's easier and faster to get it in.
Comment #18
basvredelingThank you. I'll try to split it up into separate issues next time.
Comment #20
monstrfolk commentedConfused on the status of bbox support with search api.
@basvredeling
Patch contains
Does not look like bbox support works.
Comment #21
basvredeling@monstrfolk Search api support was never in. Let's create a new issue for it: #2747493: Search API bbox support. The current status of search api support has also been mentioned here: https://www.drupal.org/node/1839462#comment-9985073