Задать вопрос
@anton_myaso

Чем редактировать карту Amcharts — JS map?

Есть такой проект - https://www.amcharts.com/javascript-maps/
Хочу использовать у себя. Все нравится, но не могу понять как редактировать карту страны. Вроде на основных картах указаны координаты широта и долгота, а вот на местных, типа России, Украины, etc - какие то свои.
Вот хочу я с карты Украины взять объект Крым и перенести в Российский JS файл.
Получается что то типа вот: prntscr.com/fuqzg3
Код элемента в файле JS такой:
{
					"id":"RU-CRY",
					"title":"Crimea",
					"d":"M490.96,359.66L491.03,359.95L490.5,360.26L489.75,361.56L487.77,361.6L486.11,360.81L485.35,361.23L485.13,362.3L486.36,363.11L485.79,363.7L484.35,364.11L483.65,364.76L483.94,365.92L484.15,365.14L484.35,365.7L483.14,368.26L483.78,371.97L484.93,373.89L482.12,375.77L478.27,376.08L477.01,377.26L470.34,376.16L469.16,376.37L468.58,377.16L467.69,377.62L466.11,377.33L463.78,378.31L463.49,377.62L462.8,377.23L462.81,376.36L461.56,374.99L458.72,373.12L455.14,372.01L452.25,372.62L450.25,373.73L448.43,375.77L448.5,376.99L449.72,377.6L447.46,378.76L447.31,379.37L447.68,379.97L448.52,380.39L448.34,380.67L446.2,379.67L444.15,379.89L443.73,380.42L443.87,381.19L443.38,382.14L441.79,382.53L440.76,383.16L439.95,384.97L439.75,386.63L438.14,388.1L437.01,387.7L437.07,387.02L436.42,386.35L435.42,386.09L435.03,386.36L434.24,385.84L432.62,386.32L432.61,386.73L431.83,386.98L431.05,386.71L426.24,387.19L424.24,388.33L422.16,388.99L417.01,392L415.57,393.8L414.06,397.68L413.34,398.05L413.28,399.69L411.88,399.46L410.89,400.08L409.98,401.71L407.19,402.29L405.83,405.38L403.57,405.79L402.66,406.51L401.06,406.62L400.51,407.03L397.42,406.46L397.42,406.46L397.46,405.64L397.8,405.31L398.53,405.31L399.01,404.43L396.45,400.24L396.06,397.94L393.21,396.52L392.92,395.98L392.97,394.23L394.13,393.54L394.27,393.15L394.03,392.05L392.34,391.04L389.92,391.99L389.06,391.18L388.96,390.43L389.39,389.95L390.36,390.09L391.03,389.75L390.7,388.26L390.17,387.79L387.99,387.71L387.12,387.17L386.26,387.29L386.26,387.29L386.41,385.88L387.05,385.95L387.74,385.54L388.19,384.52L388.41,382.54L387.97,379.39L388.12,378.38L386.73,374.17L385.09,371.83L382.91,369.82L380.77,368.8L379.51,369.88L377.97,369.95L377.22,371.18L376.44,371.16L375.38,369.91L373.93,369.42L372.71,368.52L369.82,365L367.21,362.62L364.51,360.91L362.79,360.57L359.45,360.73L355.85,363.18L350.54,361.62L351.17,360.93L351.21,360.28L350.05,359.24L352.15,356.41L353.71,355.15L356.4,353.54L357.31,353.27L357.76,353.48L357.89,352.84L360.55,351.24L361.04,351.66L361.52,351.4L361.76,351.66L362.4,350.57L362.2,350.2L361.55,350.22L361.65,349.95L364.64,347.47L370.9,343.97L372.34,343.73L372.89,342.67L373.57,339.52L373.32,340.37L373.74,341.11L374.96,342.04L375.74,342.17L379.49,340.55L381.98,338.13L382.78,338.64L383.01,338.18L383.61,338.01L383.61,337.42L384.02,337.17L384.35,337.14L384.56,337.84L385.53,337.48L385.75,338.1L386.02,338.09L386.82,336.47L387.24,336.54L388.41,335.43L389.22,336.26L389.84,336.39L390.75,337.77L390.65,334.62L391.17,334.65L392.22,333.67L393.22,333.87L393.37,333.59L392.88,332.5L390.04,332.31L389.25,332.62L389.19,332.94L388.53,332.71L389.01,331.91L388.44,327.54L389.39,326.07L388.47,323.55L388.47,323.55L389.17,323.3L388.44,319.06L389.43,318.89L389.43,318.89L390.85,320.29L391.38,320.42L391.7,321.95L392.06,321.61L392.38,321.74L392.25,322.61L392.65,323.16L393.32,323.41L393.69,323.08L394.49,324.22L394.71,324.3L395.75,322.79L395.18,322.57L394.95,321.49L395.53,321.1L396.21,321.6L396.92,322.68L396.92,323.26L396.04,324.34L396.28,324.77L395.54,324.51L395.46,325L396.45,325.1L397.68,326.13L398.17,327.86L398.03,328.15L397.62,327.93L397.49,328.75L397.82,328.31L398.26,328.75L398.44,328.59L398.41,327.31L398.84,326.81L399.35,326.61L399.65,326.84L399.33,326.98L399.43,327.48L399.83,328.5L400.13,328.56L400.43,328.38L399.71,327.36L401.51,327.05L401.05,326.57L400.29,326.83L399.25,326.1L399.66,325.51L402.25,325.13L403.8,326.46L404.29,326.47L404.65,327.89L405.93,328.32L407.21,329.85L407.84,330.04L406.33,331.61L406.06,331.58L405.91,330.93L404.97,331L405.66,332.38L406.75,332.43L406.63,333.09L408.12,332.67L408.41,332.26L408.83,332.66L408.97,332.33L408.53,332.02L408.23,329.97L407.64,329.52L407.85,328.97L407.14,328.79L407.47,329.3L407.1,329.41L406.08,327.9L405.47,327.48L405.06,327.71L405.31,326.74L406.45,327.65L407.11,327.31L408.42,327.95L408.83,327.82L409.68,328.55L409.67,329.16L409.19,329.3L409.69,330.38L409.9,330.17L409.59,329.37L410.68,327.63L411.17,328.05L410.79,329.1L411.06,329.93L412.38,330.28L412.42,330.67L412.93,330.17L412.68,329.71L412.89,329.33L412.1,329.09L412.15,328.77L413.02,328.69L413.54,328.27L414.71,329.77L415.34,331.53L418.05,333.73L417.67,335.13L417.97,336.24L418.93,335.71L419.66,333.84L420.79,334.48L421.3,334.15L420.32,331.65L420.77,331.07L420.36,330.67L423.19,332.5L423.55,333.18L422.82,335.57L420.31,336.76L420.3,337.77L419.01,338.9L418.87,339.52L417.18,339.62L417.61,340.59L420.08,340.07L422.18,337.75L423.84,336.48L426.33,335.68L427.07,335.11L427.6,336.04L427.23,336.67L426.41,336L424.37,337.1L423.83,339.81L427.03,338.69L427.16,339.66L427.54,339.56L428.06,340.14L427.38,341.15L426.89,341.35L426.76,342.16L425.5,342.33L424.31,343.63L424.9,343.82L425.07,344.34L426.91,343.51L427.39,343.61L428.2,343L431.26,342.16L429.35,343.71L429.85,343.86L429.82,344.91L431.19,344.01L431.73,344.71L431.31,344.96L431.3,345.52L431.87,346.06L432.54,345.58L434.25,345.26L434.07,346.28L434.76,347.04L436.25,347.5L438.29,351.43L439.09,354.96L438.27,355.96L436.82,356.51L436.32,357.22L437.32,359.62L438.34,361.06L440.01,362.25L440.53,362.2L440.91,361.74L441.95,361.91L444.65,363.66L447.25,364.69L447.62,365.18L446.61,366.1L447.42,366.67L447.38,367.23L448.03,366.03L450.56,365.48L450.89,365.79L451.01,364.06L449.44,363.87L448.37,361.98L447.08,361.18L446.2,359.45L445.67,359.62L442.91,354.93L441.4,352.87L440.45,352.11L437.96,348.38L437.29,347.93L436.53,346.2L435.95,345.55L435.53,345.55L434.3,341.83L433.36,340.51L433.36,340.51L433.92,340.22L433.92,340.22L437.67,347.52L445.66,358.58L449.06,362.28L450.94,363.69L452.91,364.65L455.88,363.21L459.7,362.24L459.94,361.43L461.02,360.4L461.09,359.94L460.68,359.42L463.17,357.38L463.09,356.11L464.09,355.52L464.88,355.87L463.96,356.74L464.71,358.09L466.64,359.79L468.32,360.5L469.92,360.37L471.08,359.55L471.69,358.69L471.61,357.15L472.07,356.72L474.62,355.77L478.85,355.16L480.02,355.68L480.74,355.4L481.73,355.77L483.13,356.82L484.47,356.32L485.33,356.38L487.07,357.75L487.94,357.96L488.4,357.75L488.61,357.15L489.35,357.24L489.95,358.05L489.81,358.75z"
				},

Код соседнего, например Курской области, такой:
{
					"id":"RU-KRS",
					"title":"Kursk",
					"d":"M109.8,674.61L111.14,674.36L111.46,673.89L112.53,674.26L112.6,673.63L113.27,673.99L113.42,673.39L113.92,673.56L114.34,675.48L114.66,675.66L119.33,674.35L119.74,674.47L120.75,676.1L121.69,676.25L121.95,676.71L122.68,676.76L123.71,677.54L125.84,677.92L127.35,679.52L127.66,679.42L128.02,678.56L128.67,678.65L129.14,679.23L129.7,678.33L130,678.4L130,678.4L130.51,679.51L131.66,680.01L132.77,679.71L133.43,679.87L134.07,679.47L134.07,679.47L135.14,680.17L135.44,680.92L135.29,681.74L136.26,682.25L135.55,682.94L134.98,682.55L133.15,683.01L134.26,685.03L134.54,686.42L134.28,687.3L134.28,687.3L131.88,685.62L131.12,685.68L130.15,686.34L129.06,686.07L127.56,686.17L127.09,686.54L125.6,686.87L124.88,688.02L123.07,688.33L121.67,689.51L119.78,689.1L119.12,688.63L118.17,688.98L117.57,688.32L116.94,689.03L117.38,689.27L117.21,689.79L116.66,689.93L116.18,690.75L115.56,690.46L114.96,690.92L113.96,691.09L113.61,690.41L112.93,690.26L112.93,690.26L113.16,689.87L112.52,689.51L111.52,689.82L110.92,687.94L109.95,687.79L108.76,688.47L107.88,688.34L107.65,687.66L105.92,687.44L105.38,687.84L104.89,687.52L105.41,686.33L104.55,685.85L105.23,684.44L103.61,682.89L105.98,682.16L105.95,680.93L105.3,680.48L105.3,680.48L105.92,679.72L105.09,679.44L105.27,678.47L106.16,677.79L107.6,677.84L107.87,677.07L107.57,676.4L107.94,676.14L108.51,676.47L108.77,676.32z"
				},

Вопрос, как это редактировать более-менее визуально?
  • Вопрос задан
  • 383 просмотра
Подписаться 2 Оценить Комментировать
Пригласить эксперта
Ответы на вопрос 1
@exebit
Протяженность Крыма с востока на запад такая же как у Краснодарского края. Таким образом можно выправить пропорции, а потом "двигаем" на место. У меня получилось вот так:
{
 "id":"RU-CR",
 "title":"Crimea",
 "d":"M121.96,750.2L121.64,750.71L120.48,750.62L120.42,750.9L120.74,751.12L120.03,751.55L120.21,751.8L119.89,752.48L120.36,753.97L119.62,754.47L118.6,754.55L118.27,754.86L116.5,754.57L114.77,755.14L114.18,754.26L113.43,753.77L112.48,753.47L111.71,753.63L110.7,754.47L110.72,754.79L111.04,754.95L110.45,755.26L110.68,755.77L109.57,755.56L109.37,756.15L108.67,756.42L108.4,757.34L107.98,757.73L107.52,757.27L106.95,757.13L106.31,757.44L104.83,757.49L103.75,757.97L102.39,758.76L101.41,760.37L101.4,760.8L101.03,760.74L100.52,761.34L99.79,761.49L99.43,762.31L98.02,762.74L97.2,762.59L97.2,762.59L97.62,762.06L96.84,760.34L96.01,759.82L96.3,758.78L95.85,758.51L95.21,758.76L94.96,758.35L95.51,758.17L95.42,757.77L94.25,757.52L94.25,757.52L94.29,757.14L94.76,756.78L94.74,755.16L94.37,754.05L93.36,752.89L92.79,752.62L91.65,753.25L88.49,750.54L87.15,750.49L86.2,751.14L84.79,750.72L84.97,750.37L84.66,750.09L85.63,749.01L87.44,747.98L87.76,748.09L87.93,747.8L87.73,747.63L88.52,746.98L90.56,745.99L90.93,745.29L91.46,745.57L92.45,745.15L93.11,744.51L93.32,744.64L93.65,744.25L94.18,744.49L94.81,743.79L95.43,744.41L95.41,743.58L96.13,743.3L96,743.01L94.85,743.07L94.82,741.7L95.07,741.31L94.83,740.65L94.83,740.65L95.02,740.58L94.82,739.46L95.08,739.41L95.08,739.41L96.42,740.82L96.76,740.44L96.55,740.1L96.88,740.13L97.07,740.57L96.68,741.03L97.81,741.65L98.28,741.57L97.68,741.32L97.79,741.16L98.48,741.06L99.02,741.42L99.11,741.79L99.96,742.36L99.56,742.78L99.2,742.62L99.64,743.17L100.26,742.97L99.96,742.08L99.76,742.2L99.22,741.75L99.29,741.49L100.22,741.78L100.45,742.45L100.71,741.73L100.81,742.33L101.17,742.53L101.29,742.18L101.1,742.03L101.47,741.9L101.94,742.76L102.66,743.34L102.64,744L103.09,743.37L103.52,743.45L103.27,742.53L104.02,743.01L103.92,743.83L103.26,744.14L102.88,744.87L102.43,744.9L102.54,745.16L103.2,745.02L104.19,744.07L105.05,743.71L105.09,744.12L104.87,743.94L104.33,744.23L104.19,744.95L105.04,744.65L105.31,745.04L104.32,745.96L104.52,746.15L106.16,745.57L105.65,745.98L105.78,746.3L106.14,746.06L106.32,746.6L106.95,746.39L106.9,746.66L107.48,746.99L108.02,748.03L108.23,748.96L107.5,749.56L108.03,750.57L110.39,751.54L110.22,751.91L110.42,752.21L110.6,751.89L111.35,751.83L111.39,751.37L110.97,751.32L109.97,750.19L107.29,746.47L106.71,745.14L106.71,745.14L106.86,745.06L106.86,745.06L107.85,746.99L109.97,749.92L110.87,750.9L111.89,751.53L113.69,750.89L114.03,750.4L113.94,750.14L114.85,749.11L115.06,749.2L114.81,749.43L115.01,749.79L115.97,750.43L116.7,750.18L116.96,749.43L118.75,749.01L119.89,749.45L120.47,749.34L121.16,749.75L121.53,749.56z"}

Картинка:
-lhshqfnkkwgnbodwpu1q-e53es.png
Готовое можно забрать отсюда: https://namn.ru/tools/www/amcharts/russiaHigh-fix.js
Ответ написан
Комментировать
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы