| @@ -13,10 +13,8 @@ begin | |||
| end; | |||
| var | |||
| BaseUrl: string; | |||
| code: Cardinal; | |||
| z_ok, z_no: integer; | |||
| r: integer; | |||
| begin | |||
| ResultURL := ''; | |||
| z_ok := StrToIntDef(GetBefore(';', ScriptBuffer), 1); // Максимальный масштаб, который точно есть | |||
| @@ -25,21 +23,9 @@ begin | |||
| // Масштаба нет - говорить не о чем | |||
| if getz >= z_no then exit; | |||
| // Выбор зеркала, если не указана версия | |||
| if version = '' then | |||
| r := random(3) | |||
| else | |||
| r := StrToInt(version); | |||
| case r of | |||
| 0: BaseUrl := GetURLBase; | |||
| 1: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'http://91.237.82.95:8088', 'https://maps.melda.ru'); | |||
| 2: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'http://91.237.82.95:8088/pub', 'http://map.zeskmi.ru'); | |||
| end; | |||
| // Проверяем наличие масштаба | |||
| if getz > z_ok then begin | |||
| code := GetCode(BaseUrl+'z'+inttostr(getz)+'/'); | |||
| code := GetCode(GetUrlBase+'z'+inttostr(getz)+'/'); | |||
| // Внимание! Если сервер вернёт 403 - code почему-то будет 0. Так что выбор "404 или что-то иное" | |||
| // Если дело дошло до проверки наличия масштаба - значит какая-то граница (z_ok / z_no) точно подвинется. | |||
| @@ -53,5 +39,5 @@ begin | |||
| end; | |||
| // Ок, качаем тайлик | |||
| ResultURL:= BaseUrl+'z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'; | |||
| ResultURL:= GetUrlBase+'z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'; | |||
| end. | |||
| @@ -9,7 +9,7 @@ name_ru=ГосГисЦентр 1 Км | |||
| name=GosGisCentr 1 Km | |||
| name_uk=GosGisCentr 1 Kм | |||
| NameInCache=ggc1km | |||
| DefURLBase=http://91.237.82.95:8088/pub/ggc/1km.png/ | |||
| DefURLBase=https://maps.melda.ru/pub/ggc/1km.png/ | |||
| defaultContentType=image/png | |||
| Ext=.png | |||
| projection=1 | |||
| @@ -13,10 +13,8 @@ begin | |||
| end; | |||
| var | |||
| BaseUrl: string; | |||
| code: Cardinal; | |||
| z_ok, z_no: integer; | |||
| r: integer; | |||
| begin | |||
| ResultURL := ''; | |||
| z_ok := StrToIntDef(GetBefore(';', ScriptBuffer), 1); // Максимальный масштаб, который точно есть | |||
| @@ -25,21 +23,9 @@ begin | |||
| // Масштаба нет - говорить не о чем | |||
| if getz >= z_no then exit; | |||
| // Выбор зеркала, если не указана версия | |||
| if version = '' then | |||
| r := random(3) | |||
| else | |||
| r := StrToInt(version); | |||
| case r of | |||
| 0: BaseUrl := GetURLBase; | |||
| 1: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'http://91.237.82.95:8088', 'https://maps.melda.ru'); | |||
| 2: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'http://91.237.82.95:8088/pub', 'http://map.zeskmi.ru'); | |||
| end; | |||
| // Проверяем наличие масштаба | |||
| if getz > z_ok then begin | |||
| code := GetCode(BaseUrl+'z'+inttostr(getz)+'/'); | |||
| code := GetCode(GetUrlBase+'z'+inttostr(getz)+'/'); | |||
| // Внимание! Если сервер вернёт 403 - code почему-то будет 0. Так что выбор "404 или что-то иное" | |||
| // Если дело дошло до проверки наличия масштаба - значит какая-то граница (z_ok / z_no) точно подвинется. | |||
| @@ -53,5 +39,5 @@ begin | |||
| end; | |||
| // Ок, качаем тайлик | |||
| ResultURL:= BaseUrl+'z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'; | |||
| ResultURL:= GetUrlBase+'z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'; | |||
| end. | |||
| @@ -8,7 +8,7 @@ ParentSubMenu=Topomaps\GGC | |||
| name_ru=ГосГисЦентр 250 м (.png) | |||
| name=GosGisCentr 250 m (.png) | |||
| NameInCache=genshtab250m | |||
| DefURLBase=http://91.237.82.95:8088/pub/ggc/250m.png/ | |||
| DefURLBase=https://maps.melda.ru/pub/ggc/250m.png/ | |||
| defaultContentType=image/png | |||
| IgnoreContentType=1 | |||
| Ext=.png | |||
| @@ -13,10 +13,8 @@ begin | |||
| end; | |||
| var | |||
| BaseUrl: string; | |||
| code: Cardinal; | |||
| z_ok, z_no: integer; | |||
| r: integer; | |||
| begin | |||
| ResultURL := ''; | |||
| z_ok := StrToIntDef(GetBefore(';', ScriptBuffer), 1); // Максимальный масштаб, который точно есть | |||
| @@ -25,21 +23,9 @@ begin | |||
| // Масштаба нет - говорить не о чем | |||
| if getz >= z_no then exit; | |||
| // Выбор зеркала, если не указана версия | |||
| if version = '' then | |||
| r := random(3) | |||
| else | |||
| r := StrToInt(version); | |||
| case r of | |||
| 0: BaseUrl := GetURLBase; | |||
| 1: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'http://91.237.82.95:8088', 'https://maps.melda.ru'); | |||
| 2: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'http://91.237.82.95:8088/pub', 'http://map.zeskmi.ru'); | |||
| end; | |||
| // Проверяем наличие масштаба | |||
| if getz > z_ok then begin | |||
| code := GetCode(BaseUrl+'z'+inttostr(getz)+'/'); | |||
| code := GetCode(GetURLBase+'z'+inttostr(getz)+'/'); | |||
| // Внимание! Если сервер вернёт 403 - code почему-то будет 0. Так что выбор "404 или что-то иное" | |||
| // Если дело дошло до проверки наличия масштаба - значит какая-то граница (z_ok / z_no) точно подвинется. | |||
| @@ -53,5 +39,5 @@ begin | |||
| end; | |||
| // Ок, качаем тайлик | |||
| ResultURL:= BaseUrl+'z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'; | |||
| ResultURL:= GetURLBase+'z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'; | |||
| end. | |||
| @@ -9,7 +9,7 @@ name_ru=ГосГисЦентр 2 Км | |||
| name=GosGisCentr 2 Km | |||
| name_uk=GosGisCentr 2 Kм | |||
| NameInCache=ggc2km | |||
| DefURLBase=http://91.237.82.95:8088/pub/ggc/2km.png/ | |||
| DefURLBase=https://maps.melda.ru/pub/ggc/2km.png/ | |||
| defaultContentType=image/png | |||
| Ext=.png | |||
| projection=1 | |||
| @@ -13,10 +13,8 @@ begin | |||
| end; | |||
| var | |||
| BaseUrl: string; | |||
| code: Cardinal; | |||
| z_ok, z_no: integer; | |||
| r: integer; | |||
| begin | |||
| ResultURL := ''; | |||
| z_ok := StrToIntDef(GetBefore(';', ScriptBuffer), 1); // Максимальный масштаб, который точно есть | |||
| @@ -25,21 +23,9 @@ begin | |||
| // Масштаба нет - говорить не о чем | |||
| if getz >= z_no then exit; | |||
| // Выбор зеркала, если не указана версия | |||
| if version = '' then | |||
| r := random(3) | |||
| else | |||
| r := StrToInt(version); | |||
| case r of | |||
| 0: BaseUrl := GetURLBase; | |||
| 1: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'http://91.237.82.95:8088', 'https://maps.melda.ru'); | |||
| 2: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'http://91.237.82.95:8088/pub', 'http://map.zeskmi.ru'); | |||
| end; | |||
| // Проверяем наличие масштаба | |||
| if getz > z_ok then begin | |||
| code := GetCode(BaseUrl+'z'+inttostr(getz)+'/'); | |||
| code := GetCode(GetUrlBase+'z'+inttostr(getz)+'/'); | |||
| // Внимание! Если сервер вернёт 403 - code почему-то будет 0. Так что выбор "404 или что-то иное" | |||
| // Если дело дошло до проверки наличия масштаба - значит какая-то граница (z_ok / z_no) точно подвинется. | |||
| @@ -53,5 +39,5 @@ begin | |||
| end; | |||
| // Ок, качаем тайлик | |||
| ResultURL:= BaseUrl+'z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'; | |||
| ResultURL:= GetUrlBase+'z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png'; | |||
| end. | |||
| @@ -9,7 +9,7 @@ name_ru=ГосГисЦентр 500 м | |||
| name=GosGisCentr 500 m | |||
| name_uk=GosGisCentr 500 м | |||
| NameInCache=ggc500m | |||
| DefURLBase=http://91.237.82.95:8088/pub/ggc/500m.png/ | |||
| DefURLBase=https://maps.melda.ru/pub/ggc/500m.png/ | |||
| defaultContentType=image/png | |||
| Ext=.png | |||
| projection=1 | |||
| @@ -1,25 +1,10 @@ | |||
| var | |||
| r: integer; | |||
| BaseUrl: string; | |||
| begin | |||
| // Выбор зеркала, если не указана версия | |||
| if version = '' then | |||
| r := random(3) | |||
| else | |||
| r := StrToInt(version); | |||
| case r of | |||
| 0: BaseUrl := GetURLBase; | |||
| 1: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'http://91.237.82.95:8088', 'https://maps.melda.ru'); | |||
| 2: BaseUrl := RegExprReplaceMatchSubStr(GetURLBase, 'http://91.237.82.95:8088/pub', 'http://map.zeskmi.ru'); | |||
| end; | |||
| if GetZ < 13 then | |||
| ResultURL := BaseUrl+'2km.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png' | |||
| ResultURL := GetUrlBase+'2km.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png' | |||
| else if getz <14 then | |||
| ResultURL := BaseUrl+'1km.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png' | |||
| ResultURL := GetUrlBase+'1km.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png' | |||
| else if getz <15 then | |||
| ResultURL := BaseUrl+'500m.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png' | |||
| ResultURL := GetUrlBase+'500m.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png' | |||
| else | |||
| ResultURL := BaseUrl+'250m.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png' | |||
| ResultURL := GetUrlBase+'250m.png'+'/z'+inttostr(getz)+'/'+inttostr(getx div 1024)+'/x'+inttostr(getx)+'/'+inttostr(gety div 1024)+'/y'+inttostr(gety)+'.png' | |||
| end. | |||
| @@ -8,7 +8,7 @@ ParentSubMenu=Topomaps\GGC | |||
| name_ru=ГосГисЦентр (все масштабы) | |||
| name=GosGisCentr | |||
| NameInCache=ggc_all | |||
| DefURLBase=http://91.237.82.95:8088/pub/ggc/ | |||
| DefURLBase=https://maps.melda.ru/pub/ggc/ | |||
| defaultContentType=image/png | |||
| Ext=.png | |||
| projection=1 | |||