From d4ffbe16cc14e481d49e5ff95af8c9b7ecd31d4b Mon Sep 17 00:00:00 2001 From: Jason Hall Date: Tue, 7 Oct 2014 10:12:42 -0400 Subject: [PATCH] remove *Location and add test --- maps_test.go | 3 ++- static.go | 4 ++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/maps_test.go b/maps_test.go index 6b182d7..f4dd0a3 100644 --- a/maps_test.go +++ b/maps_test.go @@ -25,6 +25,7 @@ func TestStaticMap(t *testing.T) { c := NewClient("") s := Size{512, 512} opts := &StaticMapOpts{ + Center: LatLng{-5, -5}, Markers: []Markers{ { Size: "small", @@ -65,7 +66,7 @@ func TestStaticMap(t *testing.T) { Feature: "water", Element: "geometry.fill", Rules: []StyleRule{ - {Hue: "0xFF0000"}, + {Hue: "0x0000FF"}, }, }, }, diff --git a/static.go b/static.go index acab221..05d7f81 100644 --- a/static.go +++ b/static.go @@ -48,7 +48,7 @@ func (s Size) String() string { } type StaticMapOpts struct { - Center *Location + Center Location Zoom, Scale int Format, MapType, Language, Region string Markers []Markers @@ -180,7 +180,7 @@ func (so *StaticMapOpts) update(p url.Values) { return } if so.Center != nil { - p.Set("center", (*so.Center).Location()) + p.Set("center", so.Center.Location()) } if so.Zoom != 0 { p.Set("zoom", fmt.Sprintf("%d", so.Zoom))