@@ -188,13 +188,8 @@ bool GeoTools::GeocodeDeveloper(const wxString& address, double* lat, double* lo
188188
189189 wxEasyCurl curl;
190190 wxBusyCursor curs;
191- wxMessageBox (url, " geocode developer URL" );
192-
191+
193192 // SAM issue 1968
194- /* works from command line and fails in curl.get with invalid key
195- url.Replace("&", "\\&");
196- wxMessageBox(url, "updated geocode developer URL");
197- */
198193 curl.AddHttpHeader (" Content-Type: application/json" );
199194 curl.AddHttpHeader (" Accept: application/json" );
200195
@@ -212,32 +207,10 @@ bool GeoTools::GeocodeDeveloper(const wxString& address, double* lat, double* lo
212207 rapidjson::GenericDocument < rapidjson::UTF16<> > reader;
213208 wxString str = curl.GetDataAsString ();
214209
215- // str.Replace("\"", "\\\"");
216-
217- // std::string str = curl.GetDataAsString().ToStdString();
218-
219- wxMessageBox (str, " geocode developer URL return string" );
220-
221-
222- // rapidjson::StringStream is(str.c_str());
223-
224- // doc.ParseStream(is);
225-
226-
227- // rapidjson::ParseResult ok = reader.Parse((const char*)str.c_str());
228- // rapidjson::ParseResult ok = reader.ParseStream(is);
229210 rapidjson::ParseResult ok = reader.Parse (str.c_str ());
230211
231212
232213 /*
233- ParseResult ok = doc.Parse("[42]");
234- if (!ok) {
235- fprintf(stderr, "JSON parse error: %s (%u)",
236- GetParseError_En(ok.Code()), ok.Offset());
237- exit(EXIT_FAILURE);
238- }
239-
240-
241214 example for "denver, co"
242215{"info":
243216 {"statuscode":0,"copyright":
@@ -276,7 +249,6 @@ bool GeoTools::GeocodeDeveloper(const wxString& address, double* lat, double* lo
276249 }
277250 // check status code
278251 success = false ;// overrides success of retrieving data
279- wxMessageBox (str, " geocode developer reset status code " );
280252
281253 if (reader.HasMember (L" info" )) {
282254 if (reader[L" info" ].HasMember (L" statuscode" )) {
@@ -293,16 +265,13 @@ bool GeoTools::GeocodeDeveloper(const wxString& address, double* lat, double* lo
293265 if (!success)
294266 return false ;
295267
296- wxMessageBox (str, " geocode developer success to tz " );
297268
298269
299270 if (tz != 0 )
300271 {
301272 success = false ;
302273
303274 curl = wxEasyCurl ();
304- // curl.AddHttpHeader("Content-Type: application/json");
305- // curl.AddHttpHeader("Accept: application/json");
306275
307276
308277
@@ -314,8 +283,6 @@ bool GeoTools::GeocodeDeveloper(const wxString& address, double* lat, double* lo
314283 curl.AddHttpHeader (" Accept: application/json" );
315284
316285
317- wxMessageBox (url, " geocode developer bing tz URL" );
318-
319286 if (showprogress)
320287 {
321288 if (!curl.Get (url, " Geocoding address '" + address + " '..." ))
@@ -328,8 +295,6 @@ bool GeoTools::GeocodeDeveloper(const wxString& address, double* lat, double* lo
328295
329296 str = curl.GetDataAsString ();
330297
331- wxMessageBox (str, " geocode developer bing tz URL return string" );
332-
333298 reader.Parse (str.c_str ());
334299
335300 if (!reader.HasParseError ()) {
0 commit comments