![Create React App Officially Deprecated Amid React 19 Compatibility Issues](https://cdn.sanity.io/images/cgdhsj6q/production/04fa08cf844d798abc0e1a6391c129363cc7e2ab-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Create React App Officially Deprecated Amid React 19 Compatibility Issues
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
github.com/printesoi/osm-nomitatim-go
The nominatim
package provides functions to interact with the v1 API of the OpenStreetMap Nominatim web service. It includes functionalities for reverse geocoding, retrieving details about specific OSM objects, searching for places, and looking up information based on OSM type and ID.
This is a fork of turistikrota/osm which
adds some missing fields in the ReverseResult
struct (the result of the
reverse geocoding call).
To install the package, use:
go get github.com/printesoi/osm-nominatim-go
import "github.com/printesoi/osm-nominatim-go"
Reverse(ctx context.Context, lat float64, long float64, opts ...optFunc) (*ReverseResult, error)
Details(ctx context.Context, osmType string, osmID int, opts ...optFunc) (*DetailsResult, error)
DetailsWithPlaceID(ctx context.Context, placeID int, opts ...optFunc) (*DetailsResult, error)
Search(ctx context.Context, q string, opts ...optFunc) ([]SearchResult, error)
Lookup(ctx context.Context, osmType string, osmID int, opts ...optFunc) (*LookupResult, error)
The package supports internationalization. To set the language for the API requests, use the WithLanguage
option:
result, err := osm.Reverse(ctx, 40.748817, -73.985428, osm.WithLocale("de"))
or change the default language:
osm.DefaultConfig = osm.Config{
Locale: "de",
}
package main
import (
"context"
"fmt"
nominatim "github.com/printesoi/osm-nominatim-go"
)
func main() {
ctx := context.Background()
result, err := nominatim.Reverse(ctx, 40.748817, -73.985428) // Latitude and Longitude for the Empire State Building
if err != nil {
fmt.Println("Error:", err)
return
}
fmt.Println("Reverse Geocoding Result:", result)
}
package main
import (
"context"
"fmt"
nominatim "github.com/printesoi/osm-nominatim-go"
)
func main() {
ctx := context.Background()
result, err := nominatim.DetailsWithPlaceID(ctx, 240109189) // PlaceID for the Empire State Building
if err != nil {
fmt.Println("Error:", err)
return
}
fmt.Println("Details Result:", result)
}
package main
import (
"context"
"fmt"
nominatim "github.com/printesoi/osm-nominatim-go"
)
func main() {
ctx := context.Background()
results, err := nominatim.Search(ctx, "Central Park")
if err != nil {
fmt.Println("Error:", err)
return
}
for _, result := range results {
fmt.Println("Search Result:", result)
}
}
package main
import (
"context"
"fmt"
nominatim "github.com/printesoi/osm-nominatim-go"
)
func main() {
ctx := context.Background()
result, err := nominatim.Lookup(ctx, "way", 123456789) // Example OSM type and ID
if err != nil {
fmt.Println("Error:", err)
return
}
fmt.Println("Lookup Result:", result)
}
This project is licensed under the Apache License 2.0 - see the LICENSE file for details.
FAQs
Unknown package
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Create React App is officially deprecated due to React 19 issues and lack of maintenance—developers should switch to Vite or other modern alternatives.
Security News
Oracle seeks to dismiss fraud claims in the JavaScript trademark dispute, delaying the case and avoiding questions about its right to the name.
Security News
The Linux Foundation is warning open source developers that compliance with global sanctions is mandatory, highlighting legal risks and restrictions on contributions.