{"id":861,"date":"2025-03-24T14:27:52","date_gmt":"2025-03-24T14:27:52","guid":{"rendered":"https:\/\/wpgeodirectory.com\/documentation\/article\/how-can-i-use-custom-locations-with-maps-api\/"},"modified":"2025-04-03T15:24:13","modified_gmt":"2025-04-03T14:24:13","slug":"how-can-i-use-custom-locations-with-maps-api","status":"publish","type":"gd_place","link":"https:\/\/wpgeodirectory.com\/documentation\/article\/location-manager\/how-can-i-use-custom-locations-with-maps-api\/","title":{"rendered":"How Can I Use Custom Locations with Maps API?"},"content":{"rendered":"<p>\n\tYou can add custom locations with Location Manager. However, if you are using the Maps API, it might try to set conventional values for locations, such as cities and regions, instead of your custom locations.&nbsp;<\/p>\n<p>\n\tThere are three ways to prevent this from happening.&nbsp;<\/p>\n<h2>Translate the Custom Fields<\/h2>\n<p>\n\tYou can translate and rename the fields wherever they are used in text strings to prevent the usage of conventional locations in lieu of your custom locations.&nbsp;<\/p>\n<p> <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/translations\/translating-custom-fields\/\">Read more about translating custom fields<\/a>.<\/p>\n<h2>Prevent the Map Icon from Changing<\/h2>\n<dl>\n<dt>1<\/dt>\n<dd>\n\tHead to <strong>GD &gt; Settings &gt; Locations. <\/strong>Click <strong>&#8220;Show Advanced&#8221;.&nbsp;<\/strong> <\/dd>\n<p>\t<img width=\"920\" height=\"352\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-aHO83u3urO-1024x392.png\" class=\"attachment-large size-large\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-aHO83u3urO-1024x392.png 1024w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-aHO83u3urO-300x115.png 300w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-aHO83u3urO-768x294.png 768w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-aHO83u3urO.png 1295w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><\/p>\n<dt>2<\/dt>\n<dd>\n\tTick the box against <strong>&#8220;Disable&nbsp;<\/strong><strong>set address on map from changing address fields&#8221;.<\/strong> <\/dd>\n<p>\t<img width=\"920\" height=\"312\" src=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-4xTQOawSlN-1024x347.png\" class=\"attachment-large size-large\" alt=\"\" decoding=\"async\" loading=\"lazy\" srcset=\"https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-4xTQOawSlN-1024x347.png 1024w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-4xTQOawSlN-300x102.png 300w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-4xTQOawSlN-768x260.png 768w, https:\/\/wpgeodirectory.com\/documentation\/wp-content\/uploads\/2025\/03\/file-4xTQOawSlN.png 1123w\" sizes=\"auto, (max-width: 920px) 100vw, 920px\" \/><\/p>\n<dt>3<\/dt>\n<dd>\n\tSave your settings.&nbsp;\n<\/dd>\n<\/dl>\n<p>\n\tThis will ensure that your custom locations are not overwritten by the Maps API.&nbsp;<\/p>\n<h2>Merging Locations<\/h2>\n<p>\n\tAs a last resort, you can also merge conventional locations with your custom-added locations.<\/p>\n<p> <a href=\"https:\/\/wpgeodirectory.com\/documentation\/article\/location-manager\/how-can-i-merge-locations\/\">Read more about merging two or more locations<\/a>.&nbsp;<\/p>\n","protected":false},"excerpt":{"rendered":"<p>You can add custom locations with Location Manager. However, if you are using the Maps API, it might try to set conventional values for locations, such as cities and regions, instead of your custom locations.&nbsp; There are three ways to prevent this from happening.&nbsp; Translate the Custom Fields You can translate and rename the fields [&hellip;]<\/p>\n","protected":false},"author":0,"featured_media":0,"comment_status":"open","ping_status":"closed","template":"","meta":{"footnotes":""},"article\/tags":[694,695,696,584],"article\/categories":[213,425],"class_list":["post-861","gd_place","type-gd_place","status-publish","hentry","gd_place_tags-custom-locations","gd_place_tags-maps-api","gd_place_tags-merging-locations","gd_place_tags-location-manager","gd_placecategory-extensions-features","gd_placecategory-location-manager"],"_links":{"self":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/861","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article"}],"about":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/types\/gd_place"}],"replies":[{"embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/comments?post=861"}],"version-history":[{"count":0,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/861\/revisions"}],"wp:attachment":[{"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/media?parent=861"}],"wp:term":[{"taxonomy":"gd_place_tags","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/tags?post=861"},{"taxonomy":"gd_placecategory","embeddable":true,"href":"https:\/\/wpgeodirectory.com\/documentation\/wp-json\/wp\/v2\/article\/categories?post=861"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}