{"id":775,"date":"2025-12-18T17:37:48","date_gmt":"2025-12-18T14:37:48","guid":{"rendered":"https:\/\/mapsfun.com\/?p=775"},"modified":"2025-12-18T17:37:49","modified_gmt":"2025-12-18T14:37:49","slug":"how-to-create-a-google-map-with-multiple-locations-2025-tutorial","status":"publish","type":"post","link":"https:\/\/mapsfun.com\/?p=775","title":{"rendered":"How to Create a Google Map with Multiple Locations (2025 Tutorial)"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">How to Create a Map with Multiple Locations for Free: The Technical Guide<\/h2>\n\n\n\n<p>Want to display multiple points on an interactive map without spending money? While Google Maps offers a powerful free tier, setting it up requires navigating technical hurdles. This guide will show you the official method to create a multi-location map for free using Google&#8217;s APIs.<\/p>\n\n\n\n<p><strong>The service itself is free for moderate usage, but the setup requires a Google Cloud account and basic coding knowledge.<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>Method: Using the Google Maps Platform Free Tier<\/strong><\/p>\n\n\n\n<p>Google offers a $200 monthly credit for its Maps Platform, which effectively makes it free for most small to medium websites. Here&#8217;s how to use it.<\/p>\n\n\n\n<p class=\"has-text-align-center\">Step 1: Set Up Your Google Cloud Project and API Key<\/p>\n\n\n\n<p>This is the most complex but essential step. You cannot proceed without a properly configured API key.<br><strong>1.\u00a0 Go to the Google Cloud Console: <\/strong>Navigate to <a href=\"https:\/\/console.cloud.google.com\/\">https:\/\/console.cloud.google.com\/<\/a> .<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"488\" src=\"https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-181-1024x488.png\" alt=\"\" class=\"wp-image-776\" srcset=\"https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-181-1024x488.png 1024w, https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-181-300x143.png 300w, https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-181-768x366.png 768w, https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-181-1536x732.png 1536w, https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-181.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>2.\u00a0 Create a New Project:<\/strong> Click the project dropdown and select &#8220;New Project&#8221;. Name it something recognizable like &#8220;Free-Multi-Location-Map&#8221;.<\/li>\n\n\n\n<li><strong>3.\u00a0 Enable Billing: <\/strong>This is required but you won&#8217;t be charged until you exceed the $200 monthly credit. For typical map usage, you&#8217;ll likely never pay anything.<\/li>\n\n\n\n<li><strong>4.\u00a0 Enable the Required APIs:<\/strong> Go to &#8220;APIs &amp; Services&#8221; > &#8220;Library&#8221;. Search for and enable these two essential APIs:<\/li>\n<\/ul>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>Maps JavaScript API <\/strong>(displays the map)<\/li>\n\n\n\n<li><strong>\u00a0Geocoding API<\/strong> (converts addresses to coordinates)<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"477\" src=\"https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-182-1024x477.png\" alt=\"\" class=\"wp-image-777\" srcset=\"https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-182-1024x477.png 1024w, https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-182-300x140.png 300w, https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-182-768x358.png 768w, https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-182-1536x715.png 1536w, https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-182.png 1600w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>5.\u00a0 Create and Secure Your API Key: <\/strong>Go to &#8220;APIs &amp; Services&#8221; > &#8220;Credentials&#8221;. Create a new API key and <strong>immediately restrict it<\/strong> to &#8220;HTTP referrers&#8221; and limit it to only the &#8220;Maps JavaScript API&#8221; and &#8220;Geocoding API&#8221;.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center\">Step 2: Build Your Free Multi-Location Map<\/p>\n\n\n\n<p>Create an HTML file called `free-multi-location-map.html` and use this complete code template:<strong><br>html<\/strong><\/p>\n\n\n<pre class=\"wp-block-code\" aria-describedby=\"shcb-language-1\" data-shcb-language-name=\"HTML, XML\" data-shcb-language-slug=\"xml\"><span><code class=\"hljs language-xml\"><span class=\"hljs-meta\">&lt;!DOCTYPE <span class=\"hljs-meta-keyword\">html<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">html<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">head<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">title<\/span>&gt;<\/span>Free Multi-Location Map<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">title<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">meta<\/span> <span class=\"hljs-attr\">name<\/span>=<span class=\"hljs-string\">\"viewport\"<\/span> <span class=\"hljs-attr\">content<\/span>=<span class=\"hljs-string\">\"width=device-width, initial-scale=1.0\"<\/span>&gt;<\/span>\n    <span class=\"hljs-comment\">&lt;!-- Load Google Maps API with your FREE key --&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span> <span class=\"hljs-attr\">async<\/span> <span class=\"hljs-attr\">defer<\/span> <span class=\"hljs-attr\">src<\/span>=<span class=\"hljs-string\">\"https:\/\/maps.googleapis.com\/maps\/api\/js?key=YOUR_FREE_API_KEY&amp;callback=initMap\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">style<\/span>&gt;<\/span><span class=\"css\">\n        <span class=\"hljs-selector-id\">#map<\/span> {\n            <span class=\"hljs-attribute\">height<\/span>: <span class=\"hljs-number\">500px<\/span>;\n            <span class=\"hljs-attribute\">width<\/span>: <span class=\"hljs-number\">100%<\/span>;\n            <span class=\"hljs-attribute\">border-radius<\/span>: <span class=\"hljs-number\">10px<\/span>;\n            <span class=\"hljs-attribute\">margin<\/span>: <span class=\"hljs-number\">20px<\/span> <span class=\"hljs-number\">0<\/span>;\n        }\n        <span class=\"hljs-selector-class\">.map-container<\/span> {\n            <span class=\"hljs-attribute\">max-width<\/span>: <span class=\"hljs-number\">800px<\/span>;\n            <span class=\"hljs-attribute\">margin<\/span>: <span class=\"hljs-number\">0<\/span> auto;\n            <span class=\"hljs-attribute\">padding<\/span>: <span class=\"hljs-number\">20px<\/span>;\n        }\n    <\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">style<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">head<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">body<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">class<\/span>=<span class=\"hljs-string\">\"map-container\"<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">h1<\/span>&gt;<\/span>Our Locations<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">h1<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">p<\/span>&gt;<\/span>Visit us at any of our convenient locations across the city.<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">p<\/span>&gt;<\/span>\n        <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">div<\/span> <span class=\"hljs-attr\">id<\/span>=<span class=\"hljs-string\">\"map\"<\/span>&gt;<\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n    <span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">div<\/span>&gt;<\/span>\n\n    <span class=\"hljs-tag\">&lt;<span class=\"hljs-name\">script<\/span>&gt;<\/span><span class=\"javascript\">\n        <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span> <span class=\"hljs-title\">initMap<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n            <span class=\"hljs-comment\">\/\/ Initialize the map<\/span>\n            <span class=\"hljs-keyword\">const<\/span> map = <span class=\"hljs-keyword\">new<\/span> google.maps.Map(<span class=\"hljs-built_in\">document<\/span>.getElementById(<span class=\"hljs-string\">\"map\"<\/span>), {\n                <span class=\"hljs-attr\">zoom<\/span>: <span class=\"hljs-number\">8<\/span>,\n                <span class=\"hljs-attr\">center<\/span>: { <span class=\"hljs-attr\">lat<\/span>: <span class=\"hljs-number\">40.7128<\/span>, <span class=\"hljs-attr\">lng<\/span>: <span class=\"hljs-number\">-74.0060<\/span> }, <span class=\"hljs-comment\">\/\/ New York as default center<\/span>\n            });\n\n            <span class=\"hljs-comment\">\/\/ Define your locations - add as many as you need!<\/span>\n            <span class=\"hljs-keyword\">const<\/span> locations = &#91;\n                {\n                    <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">\"Downtown Store\"<\/span>,\n                    <span class=\"hljs-attr\">position<\/span>: { <span class=\"hljs-attr\">lat<\/span>: <span class=\"hljs-number\">40.7128<\/span>, <span class=\"hljs-attr\">lng<\/span>: <span class=\"hljs-number\">-74.0060<\/span> },\n                    <span class=\"hljs-attr\">address<\/span>: <span class=\"hljs-string\">\"123 Main St, New York, NY\"<\/span>\n                },\n                {\n                    <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">\"Brooklyn Branch\"<\/span>, \n                    <span class=\"hljs-attr\">position<\/span>: { <span class=\"hljs-attr\">lat<\/span>: <span class=\"hljs-number\">40.6782<\/span>, <span class=\"hljs-attr\">lng<\/span>: <span class=\"hljs-number\">-73.9442<\/span> },\n                    <span class=\"hljs-attr\">address<\/span>: <span class=\"hljs-string\">\"456 Park Ave, Brooklyn, NY\"<\/span>\n                },\n                {\n                    <span class=\"hljs-attr\">name<\/span>: <span class=\"hljs-string\">\"Queens Outlet\"<\/span>,\n                    <span class=\"hljs-attr\">position<\/span>: { <span class=\"hljs-attr\">lat<\/span>: <span class=\"hljs-number\">40.7282<\/span>, <span class=\"hljs-attr\">lng<\/span>: <span class=\"hljs-number\">-73.7942<\/span> },\n                    <span class=\"hljs-attr\">address<\/span>: <span class=\"hljs-string\">\"789 Broadway, Queens, NY\"<\/span>\n                }\n            ];\n\n            <span class=\"hljs-keyword\">const<\/span> infowindow = <span class=\"hljs-keyword\">new<\/span> google.maps.InfoWindow();\n            <span class=\"hljs-keyword\">const<\/span> bounds = <span class=\"hljs-keyword\">new<\/span> google.maps.LatLngBounds();\n\n            <span class=\"hljs-comment\">\/\/ Add markers for each location<\/span>\n            locations.forEach(<span class=\"hljs-function\"><span class=\"hljs-params\">location<\/span> =&gt;<\/span> {\n                <span class=\"hljs-keyword\">const<\/span> marker = <span class=\"hljs-keyword\">new<\/span> google.maps.Marker({\n                    <span class=\"hljs-attr\">position<\/span>: location.position,\n                    <span class=\"hljs-attr\">map<\/span>: map,\n                    <span class=\"hljs-attr\">title<\/span>: location.name\n                });\n\n                <span class=\"hljs-comment\">\/\/ Extend bounds to include each marker<\/span>\n                bounds.extend(marker.getPosition());\n\n                <span class=\"hljs-comment\">\/\/ Add click event to show location details<\/span>\n                marker.addListener(<span class=\"hljs-string\">'click'<\/span>, () =&gt; {\n                    infowindow.setContent(<span class=\"hljs-string\">`\n                        &lt;div style=\"padding: 8px;\"&gt;\n                            &lt;h3 style=\"margin: 0 0 5px 0;\"&gt;<span class=\"hljs-subst\">${location.name}<\/span>&lt;\/h3&gt;\n                            &lt;p style=\"margin: 0; color: #666;\"&gt;<span class=\"hljs-subst\">${location.address}<\/span>&lt;\/p&gt;\n                            &lt;a href=\"https:\/\/www.google.com\/maps\/dir\/?api=1&amp;destination=<span class=\"hljs-subst\">${location.position.lat}<\/span>,<span class=\"hljs-subst\">${location.position.lng}<\/span>\" \n                               target=\"_blank\" \n                               style=\"color: #1a73e8; text-decoration: none;\"&gt;\n                                Get Directions\n                            &lt;\/a&gt;\n                        &lt;\/div&gt;\n                    `<\/span>);\n                    infowindow.open(map, marker);\n                });\n            });\n\n            <span class=\"hljs-comment\">\/\/ Auto-zoom to show all markers<\/span>\n            map.fitBounds(bounds);\n        }\n\n        <span class=\"hljs-comment\">\/\/ Handle API loading errors<\/span>\n        <span class=\"hljs-built_in\">window<\/span>.gm_authFailure = <span class=\"hljs-function\"><span class=\"hljs-keyword\">function<\/span>(<span class=\"hljs-params\"><\/span>) <\/span>{\n            alert(<span class=\"hljs-string\">\"There was an error loading the map. Please check your API key.\"<\/span>);\n        };\n    <\/span><span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">script<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">body<\/span>&gt;<\/span>\n<span class=\"hljs-tag\">&lt;\/<span class=\"hljs-name\">html<\/span>&gt;<\/span>\n<\/code><\/span><small class=\"shcb-language\" id=\"shcb-language-1\"><span class=\"shcb-language__label\">Code language:<\/span> <span class=\"shcb-language__name\">HTML, XML<\/span> <span class=\"shcb-language__paren\">(<\/span><span class=\"shcb-language__slug\">xml<\/span><span class=\"shcb-language__paren\">)<\/span><\/small><\/pre>\n\n\n<p><strong>Replace `YOUR_FREE_API_KEY` with the restricted API key you created in Step 1.<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center\">Step 3: Deploy Your Free Map<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>1.\u00a0 Test Locally:<\/strong> Open your HTML file in a web browser. You should see your map with all locations marked.<\/li>\n\n\n\n<li><strong>2.\u00a0 Upload to Your Website:<\/strong><\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&#8211; For basic websites: Upload the HTML file to your web hosting<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&#8211; For WordPress: Use a &#8220;Custom HTML&#8221; block<\/li>\n\n\n\n<li>&nbsp;&nbsp;&nbsp;&nbsp;&#8211; For other platforms: Look for an &#8220;Embed Code&#8221; or &#8220;HTML&#8221; option<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center\"><strong>The Hidden Costs of the &#8220;Free&#8221; Method<\/strong><\/p>\n\n\n\n<p>While technically free financially, this approach comes with other significant costs:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>&#8211; Time Investment:<\/strong> Setting up the Google Cloud project and API key can take beginners over an hour<\/li>\n\n\n\n<li><strong>&#8211; Technical Complexity: <\/strong>Requires understanding of API restrictions, billing accounts, and JavaScript<\/li>\n\n\n\n<li><strong>&#8211; Security Risks: <\/strong>Improperly secured API keys can lead to unexpected charges<\/li>\n\n\n\n<li><strong>&#8211; Maintenance Burden: <\/strong>Every location change requires editing code and re-uploading files<\/li>\n\n\n\n<li><strong>&#8211; Limited Features: <\/strong>Advanced styling and clustering require extensive additional coding<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center\"><strong>A Truly Simple Free Alternative<\/strong><\/p>\n\n\n\n<p>What if you could create a professional multi-location map in under 5 minutes, with no technical setup whatsoever?<\/p>\n\n\n<p><iframe src=\"https:\/\/panel.mapsfun.com\/embed-map?code=668ecbcced7931f89205d1e881bb82aa&#038;lang=uk&#038;tpl=photo\" width=\"100%\" height=\"600\" style=\"border:0\" loading=\"lazy\" referrerpolicy=\"no-referrer-when-downgrade\"><\/iframe><\/p>\n\n\n\n<p><a href=\"http:\/\/mapsfun.com\">MapsFun.com<\/a> offers a completely free plan that eliminates all these complexities:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>1.\u00a0 No Account Required:<\/strong> Start creating immediately without any sign-up<\/li>\n\n\n\n<li><strong>2.\u00a0 Visual Editor: <\/strong>Click on the map to add points &#8211; no coordinates or coding needed<\/li>\n\n\n\n<li><strong>3.\u00a0 Zero Configuration:<\/strong> No API keys, no cloud console, no billing setup<\/li>\n\n\n\n<li><strong>4.\u00a0 Rich Customization: <\/strong>Choose from multiple map styles and marker designs<\/li>\n\n\n\n<li><strong>5.\u00a0 Instant Embedding: <\/strong>Copy and paste one simple line of code to any website<\/li>\n<\/ul>\n\n\n\n<p>Why spend hours wrestling with technical setup when you can **create a beautiful, interactive multi-location map for free in just minutes at <a href=\"http:\/\/mapsfun.com\">MapsFun.com<\/a>?<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"How to Create a Map with Multiple Locations for Free: The Technical Guide Want to display multiple points on an interactive map without spending money? While Google Maps offers a powerful free tier, setting it up requires navigating technical hurdles. This guide will show you the official method to create a multi-location map for free [&hellip;]","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[104,1],"tags":[],"class_list":["post-775","post","type-post","status-publish","format-standard","hentry","category-create-a-google-map-with-multiple-locations","category-1"],"_links":{"self":[{"href":"https:\/\/mapsfun.com\/index.php?rest_route=\/wp\/v2\/posts\/775","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/mapsfun.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/mapsfun.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/mapsfun.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"https:\/\/mapsfun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=775"}],"version-history":[{"count":1,"href":"https:\/\/mapsfun.com\/index.php?rest_route=\/wp\/v2\/posts\/775\/revisions"}],"predecessor-version":[{"id":778,"href":"https:\/\/mapsfun.com\/index.php?rest_route=\/wp\/v2\/posts\/775\/revisions\/778"}],"wp:attachment":[{"href":"https:\/\/mapsfun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=775"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mapsfun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=775"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mapsfun.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=775"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}