Title: OpenCage API key
Last modified: December 30, 2018

---

# OpenCage API key

 *  Resolved [chaoti](https://wordpress.org/support/users/chaoti/)
 * (@chaoti)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/opencage-api-key/)
 * Hello [@duisterdenhaag](https://wordpress.org/support/users/duisterdenhaag/),
 * is it possible to have this plugin back without OpenCage API key? The previously
   used version worked fine without the key. I would like to have it fully open 
   source. Free OpenCage API key is only for trial.
 * The following message is displayed: “We offer the second month free to any customer–
   on any of our paid plans – who does a 15 minute call with us, so we can learn
   more about how our service is being used.”
 * In addition now I have some script errors I hadn’t seen before:
 *     ```
       Uncaught ReferenceError: 
   
       Lat is not defined at em-osm-single.min.js?ver=4.9.9:1
   
       em-osm-single.min.js?ver=4.9.9:1 Uncaught ReferenceError: map is not defined at em-osm-single.min.js?ver=4.9.9:1
   
       content_script_bundle.js:13 Uncaught (in promise) ReferenceError: currentURL is not defined at then.catch.e (content_script_bundle.js:13)
       ```
   
 * Regards,
    -  This topic was modified 7 years, 5 months ago by [chaoti](https://wordpress.org/support/users/chaoti/).
    -  This topic was modified 7 years, 5 months ago by [chaoti](https://wordpress.org/support/users/chaoti/).

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Plugin Author [Stonehenge Creations](https://wordpress.org/support/users/duisterdenhaag/)
 * (@duisterdenhaag)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/opencage-api-key/#post-11038624)
 * No, it was a conscious choice to go to the OpenCage API. It is faster, more reliable
   and offers forward and reverse geocoding, while the no-key option didn’t.
 * It also often did not return correct results or addresses were not found.
 * The version without the key did not work fine. The Ajax search did not work with
   it, for example.
 * As for your javascript. You are using some sort of plugin that alters is. I have
   not added any version to it. Please try it without that plugin.
 * Also, content_script_bundle is not of this plugin. But without a link there is
   not much I can do, except guess. 🙂
 *  Thread Starter [chaoti](https://wordpress.org/support/users/chaoti/)
 * (@chaoti)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/opencage-api-key/#post-11038725)
 * [@duisterdenhaag](https://wordpress.org/support/users/duisterdenhaag/)
 * There is a conflict with the plugin Borlabs Cookie. Blocking content doesn’t 
   work any more:
 * `[borlabs_cookie_blocked_content title="Locationmap"] #_LOCATIONMAP [/borlabs_cookie_blocked_content]`
 * Your plugin… is it that it loads script(s) on footer? Borlabs Cookie only works
   with scripts in header.
    -  This reply was modified 7 years, 5 months ago by [chaoti](https://wordpress.org/support/users/chaoti/).
 *  Plugin Author [Stonehenge Creations](https://wordpress.org/support/users/duisterdenhaag/)
 * (@duisterdenhaag)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/opencage-api-key/#post-11038728)
 * Yes, it loads in the footer, because otherwise caching plugins break it.
    Also,
   loading scripts in the footer is better for SEO, etc.
 * But why would you block the map? There is no data going anywhere but from your
   website to the visitor’s screen -> unlike Google.
 * And the scripts were never loaded in the header, but inline in previous releases.
   😉
    -  This reply was modified 7 years, 5 months ago by [Stonehenge Creations](https://wordpress.org/support/users/duisterdenhaag/).
 *  [CharlieAR](https://wordpress.org/support/users/charliear/)
 * (@charliear)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/opencage-api-key/#post-11046193)
 * I found the Open Street Maps solution, with the OSM plug-in (thank Patrick Buntsma
   et al)
    functioned faster than I could have hoped for. It was recognized by EM
   immediately, but . . . the locations are wildly inaccurate in a lot of cases.
   I tried it with fresh locations added after installing the plugin and it still
   was off by 2.4 km for example. The first errors were always putting the arrow
   in the Atlantic Ocean, near Ivory Coast, if that helps. BTW, while typing this
   I got notice of the update 1.8.4, noting compatibility with WP 5.0.2 which is
   my installed version. I ran the plug-in update, added a new location – no improvement.
   EDIT TO POST: I realized that while editing the location, just dragging the map
   pin to the proper location updates the GPS coordinates, and once published they
   stay at what I placed it to, so that’s my work around for now. For small volumes
   of locations, this will do.
    -  This reply was modified 7 years, 5 months ago by [CharlieAR](https://wordpress.org/support/users/charliear/).
      Reason: update information
 *  Plugin Author [Stonehenge Creations](https://wordpress.org/support/users/duisterdenhaag/)
 * (@duisterdenhaag)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/opencage-api-key/#post-11046199)
 * Hi Charlie,
 * First of all, when creating a new location, the coordinates are empty, so 0,0.
   And yes, that happens to be just below Africa. They should be updated to the 
   new coordinates as soon as you save the post.
    So that is NOT an error, but a
   feature. The map has to show _something_ when it has no coordinates yet.
 * Could you tell me what address is off? Preferably with a screenshot of your search
   and where the marker should be in your opinion.
 *  [CharlieAR](https://wordpress.org/support/users/charliear/)
 * (@charliear)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/opencage-api-key/#post-11050632)
 * Wrong choice of words. I wanted to share the symptoms I was seeing. I understand
   there has to be a default value for data.
    This example is a discrepancy of 2.5
   km for a driver. Other addresses I put in seem more accurate. It could be the
   rural situation which even confuses the utility companies at times. For example,
   the electric utility knows my apartment at this same address not by a number 
   or letter but by “facing the pond” and the other is “facing the street”
 * Here is a top/bottom comparison of what OSM pinned, and what I moved the pin 
   to, to get it on the true location. No big issue. I had a website covering the
   province of Ontario for sport fishing with about a thousand listings and I would
   phone the client and talk to them while I described what I saw on the map on 
   my monitor, to get the correct pin spot if I had to. Or use my own information
   from visiting them the week before. The difference of personal service.
 * [http://livemusicontario.ca/wp-content/uploads/2019/01/Open-Street-Maps-manual-vs-auto-location.jpg](http://livemusicontario.ca/wp-content/uploads/2019/01/Open-Street-Maps-manual-vs-auto-location.jpg)
    -  This reply was modified 7 years, 5 months ago by [CharlieAR](https://wordpress.org/support/users/charliear/).
 *  Plugin Author [Stonehenge Creations](https://wordpress.org/support/users/duisterdenhaag/)
 * (@duisterdenhaag)
 * [7 years, 5 months ago](https://wordpress.org/support/topic/opencage-api-key/#post-11051262)
 * I do not see the “problem” at all. You want the marker to be on a spot that has
   no official address. It’s 100% logical that a non-existing address can not be
   found by searching per address.
    Fishing spots do not have an official address.
 * If you did a simpler search, like a big square, the pin will be automatically
   placed “somewhere on that square”. That is exactly the reason why I made the 
   marker draggable. The coordinates are saved to the dragged position.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘OpenCage API key’ is closed to new replies.

 * ![](https://ps.w.org/stonehenge-em-osm/assets/icon-256x256.jpg?rev=2143406)
 * [Events Manager - OpenStreetMaps](https://wordpress.org/plugins/stonehenge-em-osm/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/stonehenge-em-osm/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/stonehenge-em-osm/)
 * [Active Topics](https://wordpress.org/support/plugin/stonehenge-em-osm/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/stonehenge-em-osm/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/stonehenge-em-osm/reviews/)

 * 7 replies
 * 3 participants
 * Last reply from: [Stonehenge Creations](https://wordpress.org/support/users/duisterdenhaag/)
 * Last activity: [7 years, 5 months ago](https://wordpress.org/support/topic/opencage-api-key/#post-11051262)
 * Status: resolved