Nicat / StaticMap

MIT License
8 stars 2 forks source link

the center param is only required if no marker represent #4

Open nguyenhaiphan opened 7 years ago

nguyenhaiphan commented 7 years ago

Follow the original doc

center (required if markers not present) defines the center of the map, equidistant from all edges of the map. This parameter takes a location as either a comma-separated {latitude,longitude} pair (e.g. "40.714728,-73.998672") or a string address (e.g. "city hall, new york, ny") identifying a unique location on the face of the earth. For more information, see Locations below. markers (optional) define one or more markers to attach to the image at specified locations. This parameter takes a single marker definition with parameters separated by the pipe character (|). Multiple markers may be placed within the same markers parameter as long as they exhibit the same style; you may add additional markers of differing styles by adding additional markers parameters. Note that if you supply markers for a map, you do not need to specify the (normally required) center and zoom parameters. For more information, see Google Static Maps API Markers below. Google Static Map API Docs

Your current implementation forces the center parameter alway appear in the url.

Nicat commented 7 years ago

@nguyenhaiphan you are right. It will be fixed in next version. Thank you.

nguyenhaiphan commented 7 years ago

Thank you