picyka Posted November 12, 2020 Share Posted November 12, 2020 https://developers.google.com/maps/documentation/javascript/examples/places-autocomplete-addressform#maps_places_autocomplete_addressform-javascript Has anyone done something like that, an entry autocomplete that searches address on google maps. Quote Link to comment Share on other sites More sharing options...
RDybuco Posted August 11, 2022 Share Posted August 11, 2022 Did you solve this task? How? This feature would be very helpful. Quote Link to comment Share on other sites More sharing options...
picyka Posted August 11, 2022 Author Share Posted August 11, 2022 13 minutos atrás, RDybuco disse: Você resolveu essa tarefa? Como? Este recurso seria muito útil. procedure TUniFormConsultaEndereco.cbPesquisaEnderecoRemoteQuery(const QueryString: string; Result: TStrings); begin var lRest := TRestNewUtils.Create('https://maps.googleapis.com/maps/api/place/autocomplete/json?input=' + TSparkleUtils.PercentEncode(QueryString) + '&language=pt_BR&key=' + _CHAVE_MAPS); try lRest.Execute; if lRest.Response.StatusCode <> 200 then Exit; var lObjectJson := lRest.ResponseJSONValue as TJSONObject; if lObjectJson.GetValue('status').Value.Equals('OK') then begin var lListPredictions := TJSONArray(lObjectJson.GetValue('predictions')); Result.Clear; for var I := 0 to lListPredictions.Count - 1 do Result.Add(AnsiUpperCase(lListPredictions.Items[I].GetValue<String>('description'))); end; finally lRest.Free; end; end; I made a separate screen without map. query address using google api. Quote Link to comment Share on other sites More sharing options...
andyhill Posted August 13, 2022 Share Posted August 13, 2022 Which Delphi unit does TRestNewUtils come from ? Quote Link to comment Share on other sites More sharing options...
picyka Posted August 13, 2022 Author Share Posted August 13, 2022 42 minutos atrás, Andyhill disse: De que unidade Delphi vem tRestNewUtils? You can use TRestClient Quote Link to comment Share on other sites More sharing options...
andyhill Posted August 13, 2022 Share Posted August 13, 2022 Thanks, what about TSparkleUtils ? Quote Link to comment Share on other sites More sharing options...
picyka Posted August 13, 2022 Author Share Posted August 13, 2022 13 minutos atrás, Andyhill disse: Obrigado, e o TSparkleUtils? Can remove. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.