Ciao Salvatore, il tuo post è vuoto. Intanto ti segnalo che esiste anche una sottosezione del forum dedicata alla comunità italiana: Italia (Italy) - OpenStreetMap Community Forum
API REST DA CAP A CEOCODE IN VB 6.0
Non si capisce il significato del tuo messaggio…
come da titolo:
conosco il CAP e vorrei sapere latitudine e longitudine.
c’è un modo in VBA o VB 6.0
grazie
Use WinHttp.WinHttpRequest.5.1 in VB and use the Nominatim search API with postalcode.
Puoi chiamare l’API di Nominatim via HTTP come documentato qui, per testare le chiamate API puoi usare questa pagina
… but only after having read the usage policy of Nominatim and making sure that you follow it: custom user agent, rate limiting etc.
example for 80128, tks
Start with a GetPostalCodeLatLon function with all the logic. Use Set http = CreateObject("WinHttp.WinHttpRequest.5.1"), add a custom user agent with http.SetRequestHeader "User-Agent", "MyCustomOsmApp/1.0 (you@example.com)", convert to json. Then just do something like: If GetPostalCodeLatLon("80128", lat, lon) Then Debug.Print lat, lon
Return should be:
- Latitude: 52.2728
- Longitude: 6.8025