SVG Marker questions
I've just started working with the Nokia mapping API, I've run into a few problems with it regarding SVG based marker objects, so I've got a couple of questions.
I'm doing something like this to create an icon that I use in a marker, the SVG I use is rather complicated, but its valid and works in most browsers that support SVG
var image = new nokia.maps.gfx.GraphicsImage(svgParser.parseSvg([SVG_MARKUP]));
The SVG contains some Feature Effects and some animations. Neither of these show up when the marker is added to the map. I get only the basic colours and layout, with none of the highlights and shadows that the feature effects give me, or any of the movement that the animation perform.
now my questions...
1. I would like to know do the markers support SVG in this way, fully animated with the FE's in place, or do they only take the basic SVG and render it to a static IDL image?
2. if they don't, can somebody suggest a way of extending the existing Markers/Images that would allow me to either render some HTML instead of a image class of some kind.
Re: SVG Marker questions
Regarding the second question - you could try using an info bubble - that would accept html within it. Alternatively you could achieve animation by using a[B] setTimeout() [/B] callback and update the static map. This is the way the geofencing example works: [url]http://api.maps.nokia.com/en/playground/env/desktop/#ex_maps_example_tracking_desc[/url]
Re: SVG Marker questions
Hi Thanks for your reply.
I've been prototyping like crazy over the last couple of days, and it looks like the svg parser doesn't like the image tag. I can't get that to work at all. So I can have either marker that has an image or a marker that contains some basic SVG markup.
I have a requirement where I need to display a marker as an .png image and above each marker have its name. I can't create a bunch of icon with names for specific markers because the images can changes for each marker as the state of the marker changes, it would be completely impracticable.
I've ended up having 2 markers being displayed at the same position and then offset with the anchor property. One of them is an image, the other is the marker name (written in svg)
As a side note, its curious that the FE's aren't rendered for the SVG markup, I'm guessing that when the operations are perform in the IDL object, it can't accurately recreate some of the more advanced operations of SVG? This seems like something that could be rendered to a canvas object before being added to the map, would this sort of feature be considered for future developments of the API?