Google Maps with Custom Marker

<div id="map"></div> <script> function initMap() { var myLatLng = {lat: 36.0497780, lng: -79.8816170}; var map = new google.maps.Map(document.getElementById('map'), { zoom: 16, disableDefaultUI: true, center: myLatLng }); var image = 'http://dynamicquest.dev.redlettermarketing.com/dq_map_lg.png'; var beachMarker = new google.maps.Marker({ position: {lat: 36.0497780, lng: -79.8816170}, map: map, icon: image }); } </script> <!DOCTYPE html> <html> <head> <meta name="viewport" content="initial-scale=1.0, user-scalable=no"> <meta charset="utf-8"> <title>Simple markers</title> <style> html, body { height: 100%; margin: 0; padding: 0; } #map { height: 100%; } </style> </head> <body> <div id="map"></div> <script> function initMap() { var myLatLng = {lat: -25.363, lng: 131.044}; var map = new google.maps.Map(document.getElementById('map'), { zoom: 4, center: myLatLng }); var marker = new google.maps.Marker({ position: myLatLng, map: map, title: 'Hello World!' }); } </script> <script async defer src="https://maps.googleapis.com/maps/api/js?key=YOUR_API_KEY&signed_in=true&callback=initMap"> </script>
Google Maps with Custom Marker

Be the first to comment

You can use [html][/html], [css][/css], [php][/php] and more to embed the code. Urls are automatically hyperlinked. Line breaks and paragraphs are automatically generated.