Google maps SVG

Developer
Size
2,434 Kb
Views
32,384

How do I make an google maps svg?

What is a google maps svg? How do you make a google maps svg? This script and codes were developed by Wojciech on 01 September 2022, Thursday.

Google maps SVG Previews

Google maps SVG - Script Codes HTML Codes

<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Google maps SVG</title> <link rel="stylesheet" href="css/style.css">
</head>
<body> <div id="map"></div>
<div class="markerImage"> <svg xmlns="http://www.w3.org/2000/svg" width="43" height="65" viewBox="0 0 43 65"> <defs> <style>.cls-1 { fill: #009ac7; } .cls-2 { fill: #fff; }</style> </defs> <g id="Warstwa_2" data-name="Warstwa 2"> <g id="Layer_1" data-name="Layer 1"> <path class="cls-1" d="M43,21.5C43,33.37,21.5,65,21.5,65S0,33.37,0,21.5a21.5,21.5,0,0,1,43,0Z"></path> <path class="cls-2" d="M31.64,23.42a10.7,10.7,0,0,1-.7,2.4,11.17,11.17,0,0,1-6,6,11.23,11.23,0,0,1-8.66,0,11.17,11.17,0,0,1-6-6,11.2,11.2,0,0,1,0-8.66,11.17,11.17,0,0,1,6-6,11.24,11.24,0,0,1,8.66,0,11.38,11.38,0,0,1,3.58,2.4c.15.15,1.22,1.45,1.47,1.83,0,0,2.46,5.17,3.19,6.16s.15,1.84-.56,1.84Z"></path> <path class="cls-1" d="M25.79,19.6l-2.23,0L21.5,18.17s3.12-.65,4.29,0,0,1.43,0,1.43"></path> </g> </g> </svg>
</div>
<script async defer src="https://maps.googleapis.com/maps/api/js?key=AIzaSyCYx3sm5zUJYpv2lcR85ckyBauVLeCUs2Y&callback=initMap">
</script> <script src="js/index.js"></script>
</body>
</html>

Google maps SVG - Script Codes CSS Codes

#map { height: 100%;
}
.markerImage { display: none;
}
/* Optional: Makes the sample page fill the window. */
html,
body { height: 100%; margin: 0; padding: 0;
}

Google maps SVG - Script Codes JS Codes

function initMap() { // svg icon var $markerImage = document.querySelector('.markerImage'), markerImageSvg = $markerImage.innerHTML || ''; var map = new google.maps.Map(document.getElementById('map'), { zoom: 4, center: { lat: -25.363882, lng: 131.044922 } }); var marker = new google.maps.Marker({ position: map.getCenter(), icon: { anchor: new google.maps.Point(43, 65), url: 'data:image/svg+xml;charset=utf-8,' + encodeURIComponent(markerImageSvg.replace('{{background}}', "#FF4847")) }, clickable: false, map: map });
}
Google maps SVG - Script Codes
Google maps SVG - Script Codes
Home Page Home
Developer Wojciech
Username wojtek1150
Uploaded September 01, 2022
Rating 3
Size 2,434 Kb
Views 32,384
Do you need developer help for Google maps SVG?

Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!

Wojciech (wojtek1150) Script Codes
Create amazing video scripts with AI!

Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!