ambiera logo

Ambiera Forum

Discussions, Help and Support.

folder icon Ambiera Forum > RocketCake
forum topic indicator Coursework
person icon
oli
Registered User
Quote
2025-04-02 13:56:59

Hello! I want to add a real life map to my website but I don’t know how to do it, does anyone have a good way of explaining this?
Even just like a code or something like that

I Hope you will get back to me soon, thank you

Oli

person icon
niko
Moderator
Quote
2025-04-03 07:44:04

You could use open street map to embed an interactive map on your website. You can paste this code into an HTML Code element:

<script src="https://unpkg.com/leaflet@1.6.0/dist/leaflet.js"></script>
<link href="https://unpkg.com/leaflet@1.6.0/dist/leaflet.css" rel="stylesheet"/>
<div id="osm-map"></div>
<script>
var element = document.getElementById('osm-map');
element.style = 'height:300px;';
var map = L.map(element);
L.tileLayer('http://{s}.tile.osm.org/{z}/{x}/{y}.png', {
attribution: '© <a href="http://osm.org/copyright">OpenStreetMap</a> contributors'
}).addTo(map);
var target = L.latLng('48.20852670657821', '16.364331936539912');
map.setView(target, 14);
L.marker(target).addTo(map);
</script>


Be sure to replace the coordinates ('48.20852670657821', '16.364331936539912') with the ones you want to focus.


Create reply:










 

  

Possible Codes


Feature Code
Link [url] www.example.com [/url]
Bold [b]bold text[/b]
Image [img]http://www.example.com/image.jpg[/img]
Quote [quote]quoted text[/quote]
Code [code]source code[/code]

Emoticons


icon_holyicon_cryicon_devilicon_lookicon_grinicon_kissicon_monkeyicon_hmpf
icon_sadicon_happyicon_smileicon_uhicon_blink   






Copyright© Ambiera e.U. all rights reserved.
Contact | Imprint | Products | Privacy Policy | Terms and Conditions |