I hope someone will be able to help me:
My situation:
I am currently working with google Maps, and I did some markers to represent a Trip. Now the Icons of these Markers can be easy changed to be an image you chose and define as follows:
var marker = new google.maps.Marker({
label: name[0],
title: name,
draggable: true,
position: { lat: lat, lng: lng },
icon: this._imgNormal,
map: _map,
customInfo: nearHotel.ID,
descr: nearHotel.descr
});
But now I need to exchange those Icons to be SVG instead of PNGs.
What I have tried
First I will explain the reason I am not using this simple way and then using it in the marker:
var icon = {
path: "M-20,0a20,20 0 1,0 40,0a20,20 0 1,0 -40,0",
fillColor: '#FF0000',
fillOpacity: .6,
anchor: new google.maps.Point(0,0),
strokeWeight: 0,
scale: 1
}
Its because I want to end up making more complex SVGs, and as far as I know this method wont allow me to for example make a flower inside of several rectangles.
I have made some research and found a way to do it on this website:
Create Google Maps Markers with Inline SVG
My Problem and Question
In Chrome and Firefox this would work, but not in IE... I started to look up why it wouldnt work and it said that it has to do something with the encodeURIComponent user, which would not work the same way in IE and that is probably why it is not supported.
Does anyone know if there is some way to make this method work in IE as well? Or is there a complete different way to use complex SVGs which would work on any browser?
I would be very glad to hear your answers, I thank you in advance
Example of a SVG I create in Illustrator
<?xml version="1.0" encoding="utf-8"?>
<!-- Generator: Adobe Illustrator 16.0.1, SVG Export Plug-In . SVG Version: 6.00 Build 0) -->
<!DOCTYPE svg PUBLIC "-//W3C//DTD SVG 1.1//EN" "http://www.w3.org/Graphics/SVG/1.1/DTD/svg11.dtd">
<svg version="1.1" id="Ebene_1" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink" x="0px" y="0px"
width="85.04px" height="85.04px" viewBox="0 0 85.04 85.04" enable-background="new 0 0 85.04 85.04" xml:space="preserve">
<g>
<g>
<circle fill="#706F6F" cx="42.466" cy="42.143" r="20.582"/>
</g>
<g>
<g>
<circle fill="#FFFFFF" cx="42.466" cy="42.143" r="18.5"/>
</g>
<circle fill="#CE1222" cx="42.466" cy="42.143" r="13.5"/>
</g>
</g>
</svg>