{"id":609,"date":"2025-12-15T11:58:33","date_gmt":"2025-12-15T08:58:33","guid":{"rendered":"https:\/\/mapsfun.com\/?p=609"},"modified":"2025-12-15T11:58:33","modified_gmt":"2025-12-15T08:58:33","slug":"how-to-create-google-maps-with-multiple-points-2025-tutorial","status":"publish","type":"post","link":"https:\/\/mapsfun.com\/?p=609","title":{"rendered":"How to Create Google Maps with Multiple Points (2025 Tutorial)"},"content":{"rendered":"\n<h2 class=\"wp-block-heading\">How to Create a Google Map with Multiple Points: The Technical Guide<\/h2>\n\n\n\n<p>Embedding an interactive map with multiple locations on your website can dramatically improve user experience. Whether you&#8217;re showcasing store locations, event venues, or project sites, a custom map makes your content more engaging. This guide will walk you through the official method using the Google Maps JavaScript API.<\/p>\n\n\n\n<p><strong>This method requires technical knowledge, including setting up a Google Cloud account and writing JavaScript code.<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center\"><strong>Method: Building with the Google Maps JavaScript API<\/strong><\/p>\n\n\n\n<p>This approach offers maximum flexibility but involves several complex steps.<\/p>\n\n\n\n<p class=\"has-text-align-center\">Step 1: Obtain Your Google Maps API Key<\/p>\n\n\n\n<p>This is the most critical and often confusing part of the process.<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>1.\u00a0 Access Google Cloud Console:<\/strong> Go to [https:\/\/console.cloud.google.com\/](https:\/\/console.cloud.google.com\/).<\/li>\n\n\n\n<li><strong>2.\u00a0 Create a New Project: <\/strong>Click the project selector at the top and create a new project with a descriptive name (e.g., &#8220;Multi-Location Map&#8221;).<\/li>\n\n\n\n<li><strong>3.\u00a0 Enable Billing: <\/strong>You must enable billing on your project. Don&#8217;t panic\u2014Google provides a <strong>$200 monthly credit<\/strong>, which typically covers significant map usage.<\/li>\n\n\n\n<li><strong>4.\u00a0 Enable Required APIs: <\/strong>Navigate to &#8220;APIs &amp; Services&#8221; > &#8220;Library&#8221; and enable these two essential services:<\/li>\n\n\n\n<li>&#8211;<strong>Maps JavaScript API<\/strong><\/li>\n\n\n\n<li>&#8211;<strong>Geocoding API <\/strong>(necessary for address conversion)<\/li>\n<\/ul>\n\n\n\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" decoding=\"async\" width=\"1024\" height=\"651\" src=\"https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-111-1024x651.png\" alt=\"\" class=\"wp-image-610\" style=\"width:671px;height:auto\" srcset=\"https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-111-1024x651.png 1024w, https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-111-300x191.png 300w, https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-111-768x488.png 768w, https:\/\/mapsfun.com\/wp-content\/uploads\/2025\/12\/image-111.png 1392w\" sizes=\"auto, (max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>You must enable the correct APIs in the Google Cloud Console library.<\/strong><\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>5.\u00a0 Generate and Secure Your API Key: <\/strong>Go to &#8220;APIs &amp; Services&#8221; > &#8220;Credentials&#8221;. Click &#8220;Create Credentials&#8221; and select &#8220;API key&#8221;. <strong>Crucially<\/strong>, restrict this key to &#8220;HTTP referrers&#8221; and limit it to only the &#8220;Maps JavaScript API&#8221; and &#8220;Geocoding API&#8221; to prevent unauthorized use.<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center\">Step 2: Develop the HTML Page with Map Code<\/p>\n\n\n\n<p>Create a new file called `multi-point-map.html` and use the following code. This script creates a map, defines locations in an array, and uses a loop to place markers.<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>Our Global Offices<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 the Google Maps API with your 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_API_KEY_HERE&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-container<\/span> {\n            <span class=\"hljs-attribute\">width<\/span>: <span class=\"hljs-number\">100%<\/span>;\n            <span class=\"hljs-attribute\">max-width<\/span>: <span class=\"hljs-number\">1200px<\/span>;\n            <span class=\"hljs-attribute\">margin<\/span>: <span class=\"hljs-number\">20px<\/span> auto;\n            <span class=\"hljs-attribute\">padding<\/span>: <span class=\"hljs-number\">20px<\/span>;\n            <span class=\"hljs-attribute\">background<\/span>: <span class=\"hljs-number\">#fff<\/span>;\n            <span class=\"hljs-attribute\">border-radius<\/span>: <span class=\"hljs-number\">10px<\/span>;\n            <span class=\"hljs-attribute\">box-shadow<\/span>: <span class=\"hljs-number\">0<\/span> <span class=\"hljs-number\">2px<\/span> <span class=\"hljs-number\">10px<\/span> <span class=\"hljs-built_in\">rgba<\/span>(<span class=\"hljs-number\">0<\/span>,<span class=\"hljs-number\">0<\/span>,<span class=\"hljs-number\">0<\/span>,<span class=\"hljs-number\">0.1<\/span>);\n        }\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\">8px<\/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\">id<\/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 Global Presence<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>Explore our offices and service centers worldwide.<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\">\/\/ Set initial map view to show all markers<\/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\">3<\/span>,\n                <span class=\"hljs-attr\">center<\/span>: { <span class=\"hljs-attr\">lat<\/span>: <span class=\"hljs-number\">30<\/span>, <span class=\"hljs-attr\">lng<\/span>: <span class=\"hljs-number\">0<\/span> }, <span class=\"hljs-comment\">\/\/ Centered to show multiple continents<\/span>\n                <span class=\"hljs-attr\">mapTypeControl<\/span>: <span class=\"hljs-literal\">true<\/span>,\n                <span class=\"hljs-attr\">streetViewControl<\/span>: <span class=\"hljs-literal\">false<\/span>\n            });\n\n            <span class=\"hljs-comment\">\/\/ Define locations: &#91;Title, Latitude, Longitude, Address]<\/span>\n            <span class=\"hljs-keyword\">const<\/span> locations = &#91;\n                &#91;<span class=\"hljs-string\">'New York HQ'<\/span>, <span class=\"hljs-number\">40.7128<\/span>, <span class=\"hljs-number\">-74.0060<\/span>, <span class=\"hljs-string\">'123 Main St, New York, NY'<\/span>],\n                &#91;<span class=\"hljs-string\">'London Office'<\/span>, <span class=\"hljs-number\">51.5074<\/span>, <span class=\"hljs-number\">-0.1278<\/span>, <span class=\"hljs-string\">'456 Park Lane, London, UK'<\/span>],\n                &#91;<span class=\"hljs-string\">'Tokyo Branch'<\/span>, <span class=\"hljs-number\">35.6762<\/span>, <span class=\"hljs-number\">139.6503<\/span>, <span class=\"hljs-string\">'789 Sakura Ave, Tokyo, Japan'<\/span>],\n                &#91;<span class=\"hljs-string\">'Sydney Office'<\/span>, <span class=\"hljs-number\">-33.8688<\/span>, <span class=\"hljs-number\">151.2093<\/span>, <span class=\"hljs-string\">'321 Harbour St, Sydney, AU'<\/span>]\n            ];\n\n            <span class=\"hljs-comment\">\/\/ Create bounds to auto-zoom to show all markers<\/span>\n            <span class=\"hljs-keyword\">const<\/span> bounds = <span class=\"hljs-keyword\">new<\/span> google.maps.LatLngBounds();\n            <span class=\"hljs-keyword\">const<\/span> infowindow = <span class=\"hljs-keyword\">new<\/span> google.maps.InfoWindow();\n\n            locations.forEach(<span class=\"hljs-function\">(<span class=\"hljs-params\">&#91;title, lat, lng, address]<\/span>) =&gt;<\/span> {\n                <span class=\"hljs-keyword\">const<\/span> position = { lat, lng };\n                <span class=\"hljs-keyword\">const<\/span> marker = <span class=\"hljs-keyword\">new<\/span> google.maps.Marker({\n                    <span class=\"hljs-attr\">position<\/span>: position,\n                    <span class=\"hljs-attr\">map<\/span>: map,\n                    <span class=\"hljs-attr\">title<\/span>: title\n                });\n\n                <span class=\"hljs-comment\">\/\/ Extend bounds for each marker<\/span>\n                bounds.extend(position);\n\n                <span class=\"hljs-comment\">\/\/ Add click event to show info window<\/span>\n                marker.addListener(<span class=\"hljs-string\">'click'<\/span>, () =&gt; {\n                    infowindow.setContent(<span class=\"hljs-string\">`\n                        &lt;div class=\"info-window\"&gt;\n                            &lt;h3&gt;<span class=\"hljs-subst\">${title}<\/span>&lt;\/h3&gt;\n                            &lt;p&gt;<span class=\"hljs-subst\">${address}<\/span>&lt;\/p&gt;\n                            &lt;button onclick=\"alert('Contacting <span class=\"hljs-subst\">${title}<\/span>')\"&gt;Get Directions&lt;\/button&gt;\n                        &lt;\/div&gt;\n                    `<\/span>);\n                    infowindow.open(map, marker);\n                });\n            });\n\n            <span class=\"hljs-comment\">\/\/ Auto-fit map to show all markers<\/span>\n            map.fitBounds(bounds);\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>\u00a0Replace `YOUR_API_KEY_HERE` with the restricted API key from Step 1.<\/strong><\/p>\n\n\n\n<p class=\"has-text-align-center\">Step 3: Implement on Your Website<\/p>\n\n\n\n<p>Test the map by opening your HTML file in a browser. For implementation:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>&#8211; Static websites<\/strong>: Upload the HTML file to your server<\/li>\n\n\n\n<li><strong>&#8211; WordPress\/Wix\/Squarespace: <\/strong>Use a custom HTML\/CSS block to insert the code<\/li>\n\n\n\n<li><strong>&#8211; Advanced setups:<\/strong> Integrate the JavaScript logic into your existing framework<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center\"><strong>The Reality of This Approach<\/strong><\/p>\n\n\n\n<p>While this method provides complete control, it presents significant challenges:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>&#8211; Steep Learning Curve: <\/strong>Requires comfort with cloud platforms and JavaScript<\/li>\n\n\n\n<li><strong>&#8211; Billing Complexity:<\/strong> Mandatory billing setup deters many users<\/li>\n\n\n\n<li><strong>&#8211; Security Risks:<\/strong> Unsecured API keys can lead to substantial costs<\/li>\n\n\n\n<li><strong>&#8211; Maintenance Overhead:<\/strong> Every location change requires code updates<\/li>\n\n\n\n<li><strong>&#8211; Limited Features:<\/strong> Advanced functionality requires extensive additional coding<\/li>\n<\/ul>\n\n\n\n<p class=\"has-text-align-center\"><strong>The Simple Solution: <a href=\"http:\/\/mapsfun.com\">MapsFun.com<\/a><\/strong><\/p>\n\n\n\n<p>Why navigate this technical maze when you can achieve professional results in minutes?<\/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><br><a href=\"http:\/\/mapsfun.com\">MapsFun.com<\/a> eliminates all these complexities:<\/p>\n\n\n\n<ul class=\"wp-block-list\">\n<li><strong>1.\u00a0 No-Code Interface:<\/strong> Click to add points, search addresses, and customize with our visual editor<\/li>\n\n\n\n<li><strong>2.\u00a0 Zero Configuration:<\/strong> No API keys, billing accounts, or security concerns<\/li>\n\n\n\n<li><strong>3.\u00a0 Advanced Features: <\/strong>Custom markers, multiple map styles, and rich info windows<\/li>\n\n\n\n<li><strong>4.\u00a0 Instant Deployment: <\/strong>Get optimized embed code for any platform<\/li>\n\n\n\n<li><strong>5.\u00a0 Automatic Updates: <\/strong>Modify your map anytime without touching code<\/li>\n<\/ul>\n\n\n\n<p>Stop wrestling with APIs and code. Create beautiful, interactive multi-point maps effortlessly at <a href=\"http:\/\/mapsfun.com\">MapsFun.com<\/a>\u00a0<\/p>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"How to Create a Google Map with Multiple Points: The Technical Guide Embedding an interactive map with multiple locations on your website can dramatically improve user experience. Whether you&#8217;re showcasing store locations, event venues, or project sites, a custom map makes your content more engaging. This guide will walk you through the official method using [&hellip;]","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[57,1],"tags":[],"class_list":["post-609","post","type-post","status-publish","format-standard","hentry","category-google-map-with-multiple-points","category-1"],"_links":{"self":[{"href":"https:\/\/mapsfun.com\/index.php?rest_route=\/wp\/v2\/posts\/609","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=609"}],"version-history":[{"count":1,"href":"https:\/\/mapsfun.com\/index.php?rest_route=\/wp\/v2\/posts\/609\/revisions"}],"predecessor-version":[{"id":611,"href":"https:\/\/mapsfun.com\/index.php?rest_route=\/wp\/v2\/posts\/609\/revisions\/611"}],"wp:attachment":[{"href":"https:\/\/mapsfun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=609"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/mapsfun.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=609"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/mapsfun.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=609"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}