mirror of
https://github.com/mpolden/echoip.git
synced 2024-11-10 07:27:22 +01:00
Remove map
Requires Google API key.
This commit is contained in:
parent
3f1e267750
commit
5ff72def9c
@ -202,13 +202,11 @@ func (s *Server) DefaultHandler(w http.ResponseWriter, r *http.Request) *appErro
|
|||||||
Host string
|
Host string
|
||||||
JSON string
|
JSON string
|
||||||
Port bool
|
Port bool
|
||||||
Map bool
|
|
||||||
}{
|
}{
|
||||||
response,
|
response,
|
||||||
r.Host,
|
r.Host,
|
||||||
string(json),
|
string(json),
|
||||||
s.LookupPort != nil,
|
s.LookupPort != nil,
|
||||||
response.Country != "" && response.City != "",
|
|
||||||
}
|
}
|
||||||
if err := t.Execute(w, &data); err != nil {
|
if err := t.Execute(w, &data); err != nil {
|
||||||
return internalServerError(err)
|
return internalServerError(err)
|
||||||
|
@ -96,13 +96,6 @@ $ http {{ .Host }}/port/8080
|
|||||||
}</pre>
|
}</pre>
|
||||||
{{ end }}
|
{{ end }}
|
||||||
</div>
|
</div>
|
||||||
{{ if .Map }}
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2">
|
|
||||||
<h2>Map</h2>
|
|
||||||
<p><img src="https://maps.googleapis.com/maps/api/staticmap?size=500x166&scale=2&markers=color%3Aorange%7Clabel%3AS%7c{{ .City }},{{ .Country }}" width="500" height="166"/>
|
|
||||||
</p>
|
|
||||||
</div>
|
|
||||||
{{ end }}
|
|
||||||
<div class="pure-u-1 pure-u-md-1-2">
|
<div class="pure-u-1 pure-u-md-1-2">
|
||||||
<h2>FAQ</h2>
|
<h2>FAQ</h2>
|
||||||
<h3>How do I force IPv4 or IPv6 lookup?</h3>
|
<h3>How do I force IPv4 or IPv6 lookup?</h3>
|
||||||
|
Loading…
Reference in New Issue
Block a user