I'm trying to display an SVG; the below code works with inline SVG, but now I have an SVG file with lots of content, so I changed it to this:
background:url("data:image/svg+xml;base64, dot-and-circle.svg") no-repeat;
But it's not working. Can anyone help?
body,html,#map_canvas{height:100%;margin:0;}
#map_canvas .centerMarker{
position:absolute;
/*url of the marker*/
background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='30' height='30'><circle cx='15' cy='15' r='10' /></svg>") no-repeat;
/*background:url('dot-and-circle.svg') no-repeat;
/*center the marker*/
top:50%;left:50%;
z-index:1;
/*fix offset when needed*/
margin-left:-10px;
margin-top:-34px;
/*size of the image*/
height:16px;
width:16px;
cursor:pointer;
}