Discussion Board

Results 1 to 3 of 3
  1. #1
    Registered User
    Join Date
    Nov 2012

    Question SVG Marker questions

    Hello all

    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.

    Thank you

  2. #2
    Regular Contributor
    Join Date
    Aug 2011

    Re: SVG Marker questions

    The SVG support in the JavaScript library does not support animated images. Basically it is supports SVG tiny - http://www.w3.org/TR/SVGMobile/ so that would explain why you are not getting animation.
    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 setTimeout() callback and update the static map. This is the way the geofencing example works: http://api.maps.nokia.com/en/playgro..._tracking_desc

  3. #3
    Registered User
    Join Date
    Nov 2012

    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?

Similar Threads

  1. Text on Marker
    By amnesia7 in forum [Archived] Maps API for Javascript
    Replies: 2
    Last Post: 2012-07-05, 12:06
  2. Click on Marker of Ovi map........
    By amitsharma_ujj in forum Qt
    Replies: 5
    Last Post: 2011-09-28, 09:30
  3. Lightmaps + marker
    By mch0lic in forum [Archived] Qt Mobility Project
    Replies: 2
    Last Post: 2011-06-19, 23:53
  4. post a marker
    By zzizz in forum Symbian
    Replies: 6
    Last Post: 2010-07-05, 22:33

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts