Documentation
¶
Index ¶
- Constants
- Variables
- func LoadCountriesDB() error
- func LoadCountry(scale, countryFile string)
- func RequestCountry(isoCode string, scale string) ([]byte, error)
- func RunWebServer(port int)
- func SetupCORS(w http.ResponseWriter, r *http.Request)
- type CountryParams
- type CountryShape
- type MapRequest
- type MapShape
- type Polygon
- type ShapeParams
- type TransformParams
Constants ¶
View Source
const SCALE_10M = "10m"
View Source
const SCALE_110M = "110m"
View Source
const SCALE_50M = "50m"
Variables ¶
View Source
var CountriesMetadata = map[string]map[string]map[string]string{}
View Source
var CountryShapes = map[string]*CountryShape{}
Functions ¶
func LoadCountriesDB ¶
func LoadCountriesDB() error
func LoadCountry ¶
func LoadCountry(scale, countryFile string)
func RunWebServer ¶
func RunWebServer(port int)
Types ¶
type CountryParams ¶
type CountryParams struct {
// contains filtered or unexported fields
}
type CountryShape ¶
type CountryShape struct { ShapeParams // contains filtered or unexported fields }
func CreateCountryShape ¶
func CreateCountryShape() *CountryShape
func (*CountryShape) GetSVG ¶
func (shape *CountryShape) GetSVG(params TransformParams, countryParams CountryParams) string
func (*CountryShape) GetSVGPath ¶
func (shape *CountryShape) GetSVGPath(params TransformParams, countryParams CountryParams) string
type MapRequest ¶
type MapShape ¶
type MapShape struct { ShapeParams // contains filtered or unexported fields }
func CreateMapShape ¶
func CreateMapShape() *MapShape
func (*MapShape) GetSVG ¶
func (m *MapShape) GetSVG(params TransformParams, countryParams CountryParams) string
type ShapeParams ¶
type ShapeParams struct {
// contains filtered or unexported fields
}
type TransformParams ¶
type TransformParams struct {
// contains filtered or unexported fields
}
func PrepareTransformParams ¶
func PrepareTransformParams(transform TransformParams, shape ShapeParams) TransformParams
Click to show internal directories.
Click to hide internal directories.