Comments (5)
Cool, thanks for the clarification. I'm glad the current design is workable for you.
from google-maps-services-go.
I'd kinda prefer not to expose the signing logic. Is it possible to feed your requests through the static map API?
from google-maps-services-go.
I understand, but for some reasons, it doesn't fit for us.
It would work if StaticMapRequest
had method SignURL(clientID string, secret []byte)
for instance:
// create request
r := StaticMapRequest{}
s := r.SignURL(clientID, secret) // staticMapAPI.path is used inside
Unfortunately, AFAIU in that case, it should be added to each request for consistency, and this is not a good way.
Anyway, thanks for helping!
from google-maps-services-go.
Can you explain how the addition of this method to the StaticMapRequest would help?
from google-maps-services-go.
Sure. I have a mobile client that has already had an implemented logic showing pictures generated via StaticMap API. It used to work with API_KEY until the rules have changed.
Now it sends to the backend a StaticMap API query for signing. As for instance, a query client=clientID&origin=Toronto
gets a signed URL https://maps.googleapis.com/maps/api/staticmap?client=clientID&origin=Toronto&signature=mPvi3crsSSM1olW2lXmzUWcLB_8=
as a response.
I agree that my previous proposal is not correct. Having a method Sign
is useless, cause it adds extra step of converting client=clientID&origin=Toronto
-> StaticMapRequest
.
In case, of making Sign
func public, private apiConfig
should be exported as well.
So, I think the current implementation is good enough.
from google-maps-services-go.
Related Issues (20)
- Directions API: Unmarshal error in detecting Route.Legs as type string HOT 1
- Go Version typo in readme HOT 1
- metrics.Request receives an already drained *http.Response HOT 2
- Is there a way to set range for radius parameters? HOT 2
- googleMap Error: connect ECONNREFUSED 0.0.0.0:443 HOT 1
- maps.Client Automatic Retry? Exponential Backoff? HOT 1
- Static maps map_id parameter support HOT 2
- feat: add relative_time_description property to PlaceReview HOT 2
- Places Search has no json tag HOT 1
- ReverseGeocode: invalid character 'U' looking for beginning of value HOT 2
- Empty spaces in the README for the go get command HOT 2
- Client.PlaceDetails fails for ID ChIJUXcBoFD-nkcR3s74TnqlDHM HOT 5
- ParsePlaceSearchFieldMask missing case for 'business_status' HOT 2
- Address Validation API missing HOT 3
- Need extra "new line character" for few postalcodes to geolocate them HOT 1
- New APIs: Address Validation, Datasets, Fleet Engine, new Places API, Routes API
- Add support for Address Descriptors to Geocoding
- @chomsin HOT 1
- @chomsin HOT 1
- Come and see β€ππXπploypoli streaming live on #BIGOLIVE and make new friends! https://slink.bigovideo.tv/BuIBpW ---γ 1 @chomsin HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from google-maps-services-go.