nur-packages

My NUR packages
git clone git://git.sikmir.ru/nur-packages
Log | Files | Refs | README | LICENSE

extra-tileproviders.patch (1520B)


      1 diff --git i/tile_provider.go w/tile_provider.go
      2 index be2c487..7adac9c 100644
      3 --- i/tile_provider.go
      4 +++ w/tile_provider.go
      5 @@ -143,6 +143,28 @@ func NewTileProviderArcgisWorldImagery() *TileProvider {
      6  	return t
      7  }
      8  
      9 +// NewTileProviderOpenTopoMapRu creates a TileProvider struct for opentopomap's tile service
     10 +func NewTileProviderOpenTopoMapRu() *TileProvider {
     11 +	t := new(TileProvider)
     12 +	t.Name = "opentopomapru"
     13 +	t.Attribution = "Maps (c) OpenTopoMap.ru [CC-BY-SA]; Data (c) OSM and contributors [ODbL]; Data (c) SRTM"
     14 +	t.TileSize = 256
     15 +	t.URLPattern = "https://tile-%[1]s.opentopomap.ru/%[2]d/%[3]d/%[4]d.png"
     16 +	t.Shards = []string{"a", "b", "c"}
     17 +	return t
     18 +}
     19 +
     20 +// NewTileProviderInkatlas creates a TileProvider struct for inkatlas's tile service
     21 +func NewTileProviderInkatlas() *TileProvider {
     22 +	t := new(TileProvider)
     23 +	t.Name = "inkatlas"
     24 +	t.Attribution = "Maps (c) Inkatlas OÜ; Data (c) OSM and contributors [ODbL]; Data (c) SRTM"
     25 +	t.TileSize = 256
     26 +	t.URLPattern = "https://tile.inkatlas.com/inkatlas/outdoor/%[2]d/%[3]d/%[4]d.png"
     27 +	t.Shards = []string{}
     28 +	return t
     29 +}
     30 +
     31  // GetTileProviders returns a map of all available TileProviders
     32  func GetTileProviders() map[string]*TileProvider {
     33  	m := make(map[string]*TileProvider)
     34 @@ -162,6 +184,8 @@ func GetTileProviders() map[string]*TileProvider {
     35  		NewTileProviderCartoDark(),
     36  		NewTileProviderArcgisWorldImagery(),
     37  		NewTileProviderWikimedia(),
     38 +		NewTileProviderOpenTopoMapRu(),
     39 +		NewTileProviderInkatlas(),
     40  	}
     41  
     42  	for _, tp := range list {