Closed (fixed)
Project:
IP Geolocation Views & Maps
Version:
7.x-1.x-dev
Component:
Code
Priority:
Normal
Category:
Bug report
Assigned:
Reporter:
Created:
28 Oct 2015 at 13:45 UTC
Updated:
12 Feb 2017 at 13:33 UTC
Jump to comment: Most recent, Most recent file
Comments
Comment #2
rdeboerUsing Google, Leaflet or OpenLayers API's?
Comment #3
ckngGoogle.
Comment #4
ckngTested with
- dev and 7.x-1.28
- Google map and Leaflet map
All combinations having the same issue. Longitude and latitude are returned from Search API Solr, which have the correct data.

Comment #5
rdeboerThanks for trying all those combinations... .that would have taken you a while...
Thanks also for the screenshot. From it I can see...... Search API is causing troubles again....
When Search API is involved, Views returns its results in a different format.
I thought I had most formats covered.... Apparently not this one....
Sigh...
Need to think about how to progress this. Best would be to have your site or something very similar on my laptop so I can run Xdebug....
I just takes a while to set up Search API, Solr (if that is what you are using) etc...
Comment #6
ckngThat would be rather tedious to replicate the setup.
Attached is a patch that add support for Search API. However, I'm not sure if there are other ways the result could be returned. It works for my case.
Potential code that would break existing implementation is
_ip_geoloc_plugin_style_get_base1(), _ip_geoloc_plugin_style_get_base2(), _ip_geoloc_plugin_style_extract_lat_lng() all looks rather hackish, are there better way?
Comment #7
ckngComment #8
ckngThe patch is working for Leaflet map. Getting error for Gmap in ip_geoloc_output_map_multi_location(), I believe due to bad lat/long passed. Likely need to add some checking there. Will update the patch.
Comment #9
ckngUpdated the patch that works for both Gmap and Leaflet. Not map specifically, but due to invalid lat/long in the results.
Comment #10
rdeboerComment #11
rdeboerComment #12
marc.groth commentedI can confirm that I too was having the exact same problem, and that the patch in #9 fixed the issue (thanks a lot ckng).
For some reason I had to apply the patch manually, but I think it's more to do with my set up than the patch itself (kept getting a 'invalid path' error when using SourceTree to attempt to apply the patch automatically).
For what it's worth, I am using the 'Map (Leaflet API, via IPGV&M)' display option for a Solr index view. I have another similar view that just uses standard Drupal nodes (i.e. not a Solr index) that has no problems; so the issue seems to be specific to Solr in this case.
Marking this as reviewed/tested.
Comment #13
marc.groth commentedComment #14
rdeboer@mark.groth
Thanks for confirming and for providing details regarding the exact circumstances.
This all adds up to further evidence that I should apply @ckng's patch soon!
Thanks to you both!
Rik
Comment #15
rdeboerPatch applied. Sorry for the delay. Better late than never, I guess.
Thanks Marc, and ckng.
Rik
Comment #17
rdeboerComment #19
pyxio commentedI have the same issue. I am using search api with database server. i have tried both 7.x-1.30 and dev version. I tried to apply the patch and it would not apply, I checked the code and see it was already committed. so in my case, it is not yet resolved. cheers.