Custom Geocoder and input

86 views
Skip to first unread message

marhab

unread,
Oct 20, 2017, 5:59:01 PM10/20/17
to cesium-dev
1. A concise explanation of the problem you're experiencing.
I am trying to run the Custom Geocoder that is in Sandcastle...
However, it never works.
This is because the minute I enter anything into the search box, the Geocoder starts running, while the query term is still incomplete. 


2. A minimal code example. If you've found a bug, this helps us reproduce and repair it.
For example, if I try to enter "San Francisco", I need to type extra fast, but still I only get "San F" before the following code runs:
OpenStreetMapNominatimGeocoder.prototype.geocode = function (input) {
       var endpoint = 'https://nominatim.openstreetmap.org/search?';
       var query = 'format=json&q=' + input;
       var requestString = enpoint + query;
So the result says "not found" because there is no city named San F.

3. Context. Why do you need to do this? We might know a better way to accomplish your goal.
I need to implement a custom geocoder, using the Cesium input box. 
Ideally I would like to adapt to Google API Geocoder. 

4. The Cesium version you're using, your operating system and browser.
I am using Cesium 1.38, with Google Chrome 61 on mac (64 bit)

Thanks for any help!!

marhab

unread,
Oct 23, 2017, 9:50:32 PM10/23/17
to cesium-dev
Ha, after not getting any replies, I searched and searched the forum, and finally found the answer, which is the "https" vs. "http" problem in the Sandcastle example.
So consider this closed. 
I am hoping to hook up a Google geocoder. We'll see if I can make it work :)

Martine

Gabby Getz

unread,
Oct 24, 2017, 5:07:32 PM10/24/17
to cesium-dev
Hi Martine,

Sorry for not responding fast! The https issue has been addressed and will be fixed in the next Cesium release.

Good luck with the Google API geocoder!

Thanks,
Gabby

--
You received this message because you are subscribed to the Google Groups "cesium-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cesium-dev+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages