Google Maps: Set markers on your own website - how it works
With Google Maps you can put a marker on your own website. We show you exactly how this works in this practical tip.
Google Maps: Set markers on your own website - with this code
- Search on Google Maps for the location where you want to place a marker and right-click there.
- Then select the "What is here?" and copy out the coordinates that are shown at the bottom of the screen.
- Then copy the following text to your website, where Maps is already inserted: var marker = new google.maps.Marker ({position: new google.maps.LatLng (48.117615, 11.595121), map: map, title: 'CHIP Practical tip : Mark '});
- Under "position", replace the coordinates in brackets that you copied earlier.
- You can also customize the title of the marker under "title". Save the changes and go to your website.
- In our example, we set a marker at CHIP in Munich.
Tip: How to use Google Maps offline
If you want to determine the straight line between two points in maps, we will show you in the next practical tip how that works.