diff --git a/dist/samples/advanced-markers-graphics/app/index.html b/dist/samples/advanced-markers-graphics/app/index.html index 2185401a..8357aeb6 100644 --- a/dist/samples/advanced-markers-graphics/app/index.html +++ b/dist/samples/advanced-markers-graphics/app/index.html @@ -19,7 +19,7 @@ + ({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"}); diff --git a/dist/samples/advanced-markers-graphics/app/index.ts b/dist/samples/advanced-markers-graphics/app/index.ts index 13254f07..de45e50e 100644 --- a/dist/samples/advanced-markers-graphics/app/index.ts +++ b/dist/samples/advanced-markers-graphics/app/index.ts @@ -25,12 +25,14 @@ async function initMap() { const pinSvg = parser.parseFromString(pinSvgString, 'image/svg+xml').documentElement; - const pinSvgMarkerView = new AdvancedMarkerElement({ map, position: { lat: 37.42475, lng: -122.094 }, content: pinSvg, title: 'A marker using a custom SVG image.', + //@ts-ignore + anchorLeft: "-50%", + anchorTop: "-50%", }); // [END maps_advanced_markers_graphics_inline] @@ -44,6 +46,9 @@ async function initMap() { position: { lat: 37.434, lng: -122.082 }, content: beachFlagImg, title: 'A marker using a custom PNG Image', + //@ts-ignore + anchorLeft: "0px", + anchorTop: "100%", }); // [END maps_advanced_markers_graphics_png] @@ -84,7 +89,6 @@ async function initMap() { content: pinElement.element, title: place.displayName, }); - // [END maps_advanced_markers_graphics_place_icon] // [START maps_advanced_markers_graphics_fontawesome] @@ -108,4 +112,4 @@ async function initMap() { } initMap(); -// [END maps_advanced_markers_graphics] \ No newline at end of file +// [END maps_advanced_markers_graphics] diff --git a/dist/samples/advanced-markers-graphics/dist/assets/index-C7BKES5s.js b/dist/samples/advanced-markers-graphics/dist/assets/index-C7BKES5s.js new file mode 100644 index 00000000..b5092f3f --- /dev/null +++ b/dist/samples/advanced-markers-graphics/dist/assets/index-C7BKES5s.js @@ -0,0 +1,5 @@ +(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const a of t.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function r(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=r(e);fetch(e.href,t)}})();/** + * @license + * Copyright 2019 Google LLC. All Rights Reserved. + * SPDX-License-Identifier: Apache-2.0 + */async function m(){const{Map:s}=await google.maps.importLibrary("maps"),{AdvancedMarkerElement:o,PinElement:r}=await google.maps.importLibrary("marker"),{Place:i}=await google.maps.importLibrary("places"),e=new s(document.getElementById("map"),{center:{lat:37.42475,lng:-122.0845},zoom:13,mapId:"4504f8b37365c3d0"}),h=new DOMParser().parseFromString('',"image/svg+xml").documentElement;new o({map:e,position:{lat:37.42475,lng:-122.094},content:h,title:"A marker using a custom SVG image.",anchorLeft:"-50%",anchorTop:"-50%"});const c=document.createElement("img");c.src=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAgCAYAAAASYli2AAACcUlEQVR4AazUA6wsZwCA0TNYXte2bdu2bdu2bdtW1I1TK6jbZ1vX3r+aoH7YL9kdn/EkSFGHZjQgRYQYSfZLUUIjWrJfI8pI/KXdDz744CNbW1u/+PDDD+/FulgBS2OpI444Yo0vv/zy+MmTJz/R1dX1ccgaGBhonTBhwjuvvvrq0VgKTchFCFdffbVrTm0244tE3RaHtvfEuZ/iOK6madqYmzF+1eqY75k4RDJtpGpXu66pU3X++ouWW0/Dzkf5pju5Z/PNN38ck1IAg7NUh99q+APXNjRttP2GabGoOvYHubo6+V9/uXJZUlcHADo+r+iaMNaSFz6+CyrojQFggW2pW4Hu7z/T89OXZrf+/v4c5kdd7C8tcRxx0RwVQoiQQ/o3MCmx+ClzjiJC9DcQCoux8PFEc476RxDyizL/0USFGoGQW4SW04gXqhEIcZH6o0hWqxEIkN+ReLsaghCtkqG1AiFZleKuNQShsCYNO9cQhIZNqVuthiAsfDBJ6R/AIUOGjNW8D/ml/WPxsiS7E51FeiNN7zP/o5JFj7PwbiCgmv0EvHvVVVc9M3PmzOmh+9sQZj4RQuuzIfR8FcJgWxj2a88999xb559//h04AcfutNNO51cqlbfDwMzw6wf4U+yP1SDgDZyGE3beeefzLr/88ut/+x1//PGX4VgcjYOwIzbBBtgQW2IP7JXNXyxCwKt4D1PRhgEAQBW9aEcXBhEhj3rE6EBrCgjoxhRMQi8CAEKG9mdYFRFitCHCAAYiBLyMVzAE4zI8+HvhH+ZHyBwhBeBvdyuYvUL2A7EaN9fgL6OPgaMG/qemgX9huYBSgwHnr9+YKVsfRAAAAABJRU5ErkJggg==",import.meta.url).href,new o({map:e,position:{lat:37.434,lng:-122.082},content:c,title:"A marker using a custom PNG Image",anchorLeft:"0px",anchorTop:"100%"});const l=document.createElement("img");l.src=new URL("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100%25'%20height='100%25'%20viewBox='0%200%2024%2024'%3e%3cg%20transform='matrix(1,%200,%200,%201,%2027.009001,%20-39.238998)'%3e%3cpath%20fill='%23FFFFFF'%20d='M%20-3.264%2051.509%20C%20-3.264%2050.719%20-3.334%2049.969%20-3.454%2049.239%20L%20-14.754%2049.239%20L%20-14.754%2053.749%20L%20-8.284%2053.749%20C%20-8.574%2055.229%20-9.424%2056.479%20-10.684%2057.329%20L%20-10.684%2060.329%20L%20-6.824%2060.329%20C%20-4.564%2058.239%20-3.264%2055.159%20-3.264%2051.509%20Z'/%3e%3cpath%20fill='%23FFFFFF'%20d='M%20-14.754%2063.239%20C%20-11.514%2063.239%20-8.804%2062.159%20-6.824%2060.329%20L%20-10.684%2057.329%20C%20-11.764%2058.049%20-13.134%2058.489%20-14.754%2058.489%20C%20-17.884%2058.489%20-20.534%2056.379%20-21.484%2053.529%20L%20-25.464%2053.529%20L%20-25.464%2056.619%20C%20-23.494%2060.539%20-19.444%2063.239%20-14.754%2063.239%20Z'/%3e%3cpath%20fill='%23FFFFFF'%20d='M%20-21.484%2053.529%20C%20-21.734%2052.809%20-21.864%2052.039%20-21.864%2051.239%20C%20-21.864%2050.439%20-21.724%2049.669%20-21.484%2048.949%20L%20-21.484%2045.859%20L%20-25.464%2045.859%20C%20-26.284%2047.479%20-26.754%2049.299%20-26.754%2051.239%20C%20-26.754%2053.179%20-26.284%2054.999%20-25.464%2056.619%20L%20-21.484%2053.529%20Z'/%3e%3cpath%20fill='%23FFFFFF'%20d='M%20-14.754%2043.989%20C%20-12.984%2043.989%20-11.404%2044.599%20-10.154%2045.789%20L%20-6.734%2042.369%20C%20-8.804%2040.429%20-11.514%2039.239%20-14.754%2039.239%20C%20-19.444%2039.239%20-23.494%2041.939%20-25.464%2045.859%20L%20-21.484%2048.949%20C%20-20.534%2046.099%20-17.884%2043.989%20-14.754%2043.989%20Z'/%3e%3c/g%3e%3c/svg%3e",import.meta.url).href;const p=new r({glyph:l});new o({map:e,position:{lat:37.425,lng:-122.07},content:p.element,title:"A marker using a custom SVG for the glyph."});const n=new i({id:"ChIJN5Nz71W3j4ARhx5bwpTQEGg"});await n.fetchFields({fields:["location","displayName","svgIconMaskURI","iconBackgroundColor"]});const g=new r({background:n.iconBackgroundColor,glyph:new URL(String(n.svgIconMaskURI))});new o({map:e,position:n.location,content:g.element,title:n.displayName});const d=document.createElement("div");d.innerHTML='';const u=new r({glyph:d,glyphColor:"#ff8300",background:"#FFD514",borderColor:"#ff8300"});new o({map:e,position:{lat:37.412,lng:-122.095829650878},content:u.element,title:"A marker using a FontAwesome icon for the glyph."})}m(); diff --git a/dist/samples/advanced-markers-graphics/dist/assets/index-ds_jPwCT.js b/dist/samples/advanced-markers-graphics/dist/assets/index-ds_jPwCT.js deleted file mode 100644 index f1661b89..00000000 --- a/dist/samples/advanced-markers-graphics/dist/assets/index-ds_jPwCT.js +++ /dev/null @@ -1,5 +0,0 @@ -(function(){const o=document.createElement("link").relList;if(o&&o.supports&&o.supports("modulepreload"))return;for(const e of document.querySelectorAll('link[rel="modulepreload"]'))i(e);new MutationObserver(e=>{for(const t of e)if(t.type==="childList")for(const a of t.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&i(a)}).observe(document,{childList:!0,subtree:!0});function r(e){const t={};return e.integrity&&(t.integrity=e.integrity),e.referrerPolicy&&(t.referrerPolicy=e.referrerPolicy),e.crossOrigin==="use-credentials"?t.credentials="include":e.crossOrigin==="anonymous"?t.credentials="omit":t.credentials="same-origin",t}function i(e){if(e.ep)return;e.ep=!0;const t=r(e);fetch(e.href,t)}})();/** - * @license - * Copyright 2019 Google LLC. All Rights Reserved. - * SPDX-License-Identifier: Apache-2.0 - */async function m(){const{Map:s}=await google.maps.importLibrary("maps"),{AdvancedMarkerElement:o,PinElement:r}=await google.maps.importLibrary("marker"),{Place:i}=await google.maps.importLibrary("places"),e=new s(document.getElementById("map"),{center:{lat:37.42475,lng:-122.0845},zoom:13,mapId:"4504f8b37365c3d0"}),p=new DOMParser().parseFromString('',"image/svg+xml").documentElement;new o({map:e,position:{lat:37.42475,lng:-122.094},content:p,title:"A marker using a custom SVG image."});const l=document.createElement("img");l.src=new URL("data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABQAAAAgCAYAAAASYli2AAACcUlEQVR4AazUA6wsZwCA0TNYXte2bdu2bdu2bdtW1I1TK6jbZ1vX3r+aoH7YL9kdn/EkSFGHZjQgRYQYSfZLUUIjWrJfI8pI/KXdDz744CNbW1u/+PDDD+/FulgBS2OpI444Yo0vv/zy+MmTJz/R1dX1ccgaGBhonTBhwjuvvvrq0VgKTchFCFdffbVrTm0244tE3RaHtvfEuZ/iOK6madqYmzF+1eqY75k4RDJtpGpXu66pU3X++ouWW0/Dzkf5pju5Z/PNN38ck1IAg7NUh99q+APXNjRttP2GabGoOvYHubo6+V9/uXJZUlcHADo+r+iaMNaSFz6+CyrojQFggW2pW4Hu7z/T89OXZrf+/v4c5kdd7C8tcRxx0RwVQoiQQ/o3MCmx+ClzjiJC9DcQCoux8PFEc476RxDyizL/0USFGoGQW4SW04gXqhEIcZH6o0hWqxEIkN+ReLsaghCtkqG1AiFZleKuNQShsCYNO9cQhIZNqVuthiAsfDBJ6R/AIUOGjNW8D/ml/WPxsiS7E51FeiNN7zP/o5JFj7PwbiCgmv0EvHvVVVc9M3PmzOmh+9sQZj4RQuuzIfR8FcJgWxj2a88999xb559//h04AcfutNNO51cqlbfDwMzw6wf4U+yP1SDgDZyGE3beeefzLr/88ut/+x1//PGX4VgcjYOwIzbBBtgQW2IP7JXNXyxCwKt4D1PRhgEAQBW9aEcXBhEhj3rE6EBrCgjoxhRMQi8CAEKG9mdYFRFitCHCAAYiBLyMVzAE4zI8+HvhH+ZHyBwhBeBvdyuYvUL2A7EaN9fgL6OPgaMG/qemgX9huYBSgwHnr9+YKVsfRAAAAABJRU5ErkJggg==",import.meta.url).href,new o({map:e,position:{lat:37.434,lng:-122.082},content:l,title:"A marker using a custom PNG Image"});const c=document.createElement("img");c.src=new URL("data:image/svg+xml,%3csvg%20xmlns='http://www.w3.org/2000/svg'%20width='100%25'%20height='100%25'%20viewBox='0%200%2024%2024'%3e%3cg%20transform='matrix(1,%200,%200,%201,%2027.009001,%20-39.238998)'%3e%3cpath%20fill='%23FFFFFF'%20d='M%20-3.264%2051.509%20C%20-3.264%2050.719%20-3.334%2049.969%20-3.454%2049.239%20L%20-14.754%2049.239%20L%20-14.754%2053.749%20L%20-8.284%2053.749%20C%20-8.574%2055.229%20-9.424%2056.479%20-10.684%2057.329%20L%20-10.684%2060.329%20L%20-6.824%2060.329%20C%20-4.564%2058.239%20-3.264%2055.159%20-3.264%2051.509%20Z'/%3e%3cpath%20fill='%23FFFFFF'%20d='M%20-14.754%2063.239%20C%20-11.514%2063.239%20-8.804%2062.159%20-6.824%2060.329%20L%20-10.684%2057.329%20C%20-11.764%2058.049%20-13.134%2058.489%20-14.754%2058.489%20C%20-17.884%2058.489%20-20.534%2056.379%20-21.484%2053.529%20L%20-25.464%2053.529%20L%20-25.464%2056.619%20C%20-23.494%2060.539%20-19.444%2063.239%20-14.754%2063.239%20Z'/%3e%3cpath%20fill='%23FFFFFF'%20d='M%20-21.484%2053.529%20C%20-21.734%2052.809%20-21.864%2052.039%20-21.864%2051.239%20C%20-21.864%2050.439%20-21.724%2049.669%20-21.484%2048.949%20L%20-21.484%2045.859%20L%20-25.464%2045.859%20C%20-26.284%2047.479%20-26.754%2049.299%20-26.754%2051.239%20C%20-26.754%2053.179%20-26.284%2054.999%20-25.464%2056.619%20L%20-21.484%2053.529%20Z'/%3e%3cpath%20fill='%23FFFFFF'%20d='M%20-14.754%2043.989%20C%20-12.984%2043.989%20-11.404%2044.599%20-10.154%2045.789%20L%20-6.734%2042.369%20C%20-8.804%2040.429%20-11.514%2039.239%20-14.754%2039.239%20C%20-19.444%2039.239%20-23.494%2041.939%20-25.464%2045.859%20L%20-21.484%2048.949%20C%20-20.534%2046.099%20-17.884%2043.989%20-14.754%2043.989%20Z'/%3e%3c/g%3e%3c/svg%3e",import.meta.url).href;const g=new r({glyph:c});new o({map:e,position:{lat:37.425,lng:-122.07},content:g.element,title:"A marker using a custom SVG for the glyph."});const n=new i({id:"ChIJN5Nz71W3j4ARhx5bwpTQEGg"});await n.fetchFields({fields:["location","displayName","svgIconMaskURI","iconBackgroundColor"]});const h=new r({background:n.iconBackgroundColor,glyph:new URL(String(n.svgIconMaskURI))});new o({map:e,position:n.location,content:h.element,title:n.displayName});const d=document.createElement("div");d.innerHTML='';const u=new r({glyph:d,glyphColor:"#ff8300",background:"#FFD514",borderColor:"#ff8300"});new o({map:e,position:{lat:37.412,lng:-122.095829650878},content:u.element,title:"A marker using a FontAwesome icon for the glyph."})}m(); diff --git a/dist/samples/advanced-markers-graphics/dist/index.html b/dist/samples/advanced-markers-graphics/dist/index.html index e275de42..1487c65f 100644 --- a/dist/samples/advanced-markers-graphics/dist/index.html +++ b/dist/samples/advanced-markers-graphics/dist/index.html @@ -11,7 +11,7 @@ - + @@ -19,7 +19,7 @@ + ({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"}); diff --git a/dist/samples/advanced-markers-graphics/docs/index.html b/dist/samples/advanced-markers-graphics/docs/index.html index 2185401a..8357aeb6 100644 --- a/dist/samples/advanced-markers-graphics/docs/index.html +++ b/dist/samples/advanced-markers-graphics/docs/index.html @@ -19,7 +19,7 @@ + ({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"}); diff --git a/dist/samples/advanced-markers-graphics/docs/index.js b/dist/samples/advanced-markers-graphics/docs/index.js index 0937b4a9..0a0a180a 100644 --- a/dist/samples/advanced-markers-graphics/docs/index.js +++ b/dist/samples/advanced-markers-graphics/docs/index.js @@ -24,6 +24,9 @@ async function initMap() { position: { lat: 37.42475, lng: -122.094 }, content: pinSvg, title: 'A marker using a custom SVG image.', + //@ts-ignore + anchorLeft: "-50%", + anchorTop: "-50%", }); // [END maps_advanced_markers_graphics_inline] // [START maps_advanced_markers_graphics_png] @@ -35,6 +38,9 @@ async function initMap() { position: { lat: 37.434, lng: -122.082 }, content: beachFlagImg, title: 'A marker using a custom PNG Image', + //@ts-ignore + anchorLeft: "0px", + anchorTop: "100%", }); // [END maps_advanced_markers_graphics_png] // [START maps_advanced_markers_graphics_svg_glyph] diff --git a/dist/samples/advanced-markers-graphics/docs/index.ts b/dist/samples/advanced-markers-graphics/docs/index.ts index 13254f07..de45e50e 100644 --- a/dist/samples/advanced-markers-graphics/docs/index.ts +++ b/dist/samples/advanced-markers-graphics/docs/index.ts @@ -25,12 +25,14 @@ async function initMap() { const pinSvg = parser.parseFromString(pinSvgString, 'image/svg+xml').documentElement; - const pinSvgMarkerView = new AdvancedMarkerElement({ map, position: { lat: 37.42475, lng: -122.094 }, content: pinSvg, title: 'A marker using a custom SVG image.', + //@ts-ignore + anchorLeft: "-50%", + anchorTop: "-50%", }); // [END maps_advanced_markers_graphics_inline] @@ -44,6 +46,9 @@ async function initMap() { position: { lat: 37.434, lng: -122.082 }, content: beachFlagImg, title: 'A marker using a custom PNG Image', + //@ts-ignore + anchorLeft: "0px", + anchorTop: "100%", }); // [END maps_advanced_markers_graphics_png] @@ -84,7 +89,6 @@ async function initMap() { content: pinElement.element, title: place.displayName, }); - // [END maps_advanced_markers_graphics_place_icon] // [START maps_advanced_markers_graphics_fontawesome] @@ -108,4 +112,4 @@ async function initMap() { } initMap(); -// [END maps_advanced_markers_graphics] \ No newline at end of file +// [END maps_advanced_markers_graphics] diff --git a/dist/samples/advanced-markers-graphics/jsfiddle/demo.html b/dist/samples/advanced-markers-graphics/jsfiddle/demo.html index c22b107d..6ef2a74c 100644 --- a/dist/samples/advanced-markers-graphics/jsfiddle/demo.html +++ b/dist/samples/advanced-markers-graphics/jsfiddle/demo.html @@ -19,7 +19,7 @@ + ({key: "AIzaSyA6myHzS10YXdcazAFalmXvDkrYCp5cLc8", v: "weekly"}); diff --git a/dist/samples/advanced-markers-graphics/jsfiddle/demo.js b/dist/samples/advanced-markers-graphics/jsfiddle/demo.js index 24161d15..5eecfb4d 100644 --- a/dist/samples/advanced-markers-graphics/jsfiddle/demo.js +++ b/dist/samples/advanced-markers-graphics/jsfiddle/demo.js @@ -24,6 +24,9 @@ async function initMap() { position: { lat: 37.42475, lng: -122.094 }, content: pinSvg, title: 'A marker using a custom SVG image.', + //@ts-ignore + anchorLeft: "-50%", + anchorTop: "-50%", }); @@ -35,6 +38,9 @@ async function initMap() { position: { lat: 37.434, lng: -122.082 }, content: beachFlagImg, title: 'A marker using a custom PNG Image', + //@ts-ignore + anchorLeft: "0px", + anchorTop: "100%", });