Wellington's public fiddles
-
8qkv2tzg
jQuery 3.3.1, HTML, CSS, JavaScript
-
dwbz4x5s
No-Library (pure JS), HTML, CSS, JavaScript
-
Custom HTML Elements as Map Markers
This example demonstrates how you can use JavaScript Maps' API functions and events to easily add custom-styled HTML elements as map markers. Each map marker is a separate <strong><div></strong> element with two child elements. Styled using CSS. Markers are placed into map's container and globally-positioned using <strong>top</strong> and <strong>left</strong> style properties. The code uses JavaScript Maps' built-in API functions <strong>longitudeToX()</strong> and <strong>latitudeToY()</strong> to translate marker's longitude and latitude into screen coordinates.
-
Custom HTML Elements as Map Markers
This example demonstrates how you can use JavaScript Maps' API functions and events to easily add custom-styled HTML elements as map markers. Each map marker is a separate <strong><div></strong> element with two child elements. Styled using CSS. Markers are placed into map's container and globally-positioned using <strong>top</strong> and <strong>left</strong> style properties. The code uses JavaScript Maps' built-in API functions <strong>longitudeToX()</strong> and <strong>latitudeToY()</strong> to translate marker's longitude and latitude into screen coordinates.