This may be more related to Geofield and/or Geocoder - in any event, I've been trying for months now to get what I have working with Openlayers and Geofield v.1 working with with Geofield v.2.

See for an example of what I'm doing. The missing piece is point location, so that the voter can enter an address and see what district they're in. As I understand it, this is possible only with Geofield v.2.

Points are OK - it's the boundaries that don't work after the upgrade and I don't know how many people are doing boundaries. In any event, below is the error I get in watchdog - JSON boundary layers simply don't render.

Exception: Google API returned bad status.\nStatus: ZERO_RESULTS in geocoder_google() (line 58 of /home/[site]/public_html/[subdomain]/sites/all/modules/geocoder/plugins/geocoder_handler/

I've posted to both Geolocator and Geofield without success - perhaps someone can point me in the right direction?

Thanks in advance to anyone who can help - and, above all, thanks for the terrific work you're doing here. Openlayers rocks!

(Update: I'm attaching two GeoJSON files for easier testing - hope this helps...)

#6 suffolk_townships.txt115.71 KBbcobin
#6 babylon.txt12.72 KBbcobin
Members fund testing for the Drupal project. Drupal Association Learn more


rhclayto’s picture

In my case it was the browser at fault. The new Firefox 23 has a Mixed Content Blocker which was blocking the json responses from Apparently the newer versions of Chrome & IE have the same feature.


If you see a shield icon in the URL bar, this is likely what's happening. The new Mixed Content Blocker in Firefox can be turned off on a page for the session, but that will not persist across sessions, windows, or tabs. It also does not allow the whitelisting of URLs. It can, however, be turned off entirely:

If you're using a recently updated Firefox, try this.

Pol’s picture

Status: Active » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

bcobin’s picture

Version: 7.x-2.0-beta7 » 7.x-2.x-dev
Issue summary: View changes

Revisiting this after Election Day and reopening - it's not a browser thing and the behavior persists despite installing all current code updates.

All I can think of here is that most people are using OL for points as opposed to boundaries, so that others are not running into this; in any event, AFAICT, GeoJSON boundaries with Geofield 2.x no longer work.

bcobin’s picture

Status: Closed (fixed) » Needs work

Changing issue status and further update:

I'm using a GeoJSON file loaded via URL that's a FeatureCollection with polygons. I've checked the GeoJSON files on GeoJSOMLint and they're fine. Pasting a single feature into the layer likewise doesn't work, which might make things easier to track down. In any event, although Geocoder is throwing the error, this looks to me more like an OpenLayers issue. Thanks for any help here...

bcobin’s picture

Issue summary: View changes
12.72 KB
115.71 KB
bcobin’s picture

Title: Exception: Google API returned bad status » Exception: Google API returned bad status and GeoJSON polygons not generated
Issue summary: View changes
bcobin’s picture

SOLVED - I changed the projection and not the multi-polygon layer is now coming up OK. Can't believe it too me this long to find it... ugh! Perhaps this will help somebody else...

FeyP’s picture

Status: Needs work » Closed (works as designed)

Glad you were able to resolve the problem. Let's close this issue then.