×

Discussion Board

Results 1 to 5 of 5
  1. #1
    Registered User
    Join Date
    Nov 2008
    Posts
    9

    Smile [moved] Editing SVG Images in Nokia 95

    Hi There,

    Im new to mobile development, i am creating a location service based app which plots a waypoint on a SVG map. i want to change the "viewBox" property in the svg file real-time by using the following method:

    Assume "baseImage" is a SVGSVGElement and what i want to do is this

    baseImage.setTrait("viewBox","0,0,120,120");

    This works fine on the emulator but as you know its whether it works or not on the real device that counts. Is there only limited support for the JSR-226 api at the moment?

    Any help will be greatly appreciated


    Thanks!

  2. #2
    Registered User
    Join Date
    Nov 2008
    Posts
    9

    Re: Editing SVG Images in Nokia 95

    Update:Managed to sort out the problem myself its not easy to realise your errors when the emulator is so leaneant with code and the actual device is harsh on the slighest logical error. if anyone is intreted let me know and ill explain

  3. #3
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Editing SVG Images in Nokia 95

    Please do explain, I'm curios what kind of error could not be detected in the emulator.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

  4. #4
    Registered User
    Join Date
    Nov 2008
    Posts
    9

    Re: Editing SVG Images in Nokia 95

    well i used the following code which worked on the emulator

    Assume "baseImage" is a SVGSVG element

    baseImage = (SVGSVGElement)(img.getDocument().getDocumentElement());

    if i wanted to change its "viewBox" property i simply did the following

    baseImage.setTrait("viewBox","0,0,200,200");

    This worked on the Emulator but not on the device, after a few attempts i tweaked the code to behave like this:

    private SVGRect zoomBox=null;
    zoomBox=baseImage.getRectTrait("viewBox");
    zoomBox.setX(200);
    zoomBox.setY(200);
    baseImage.setRectTrait("viewBox", zoomBox);

    This worked perfectly on both the emulator and the device

  5. #5
    Nokia Developer Moderator
    Join Date
    Sep 2004
    Location
    Tampere, Finland
    Posts
    11,359

    Re: Editing SVG Images in Nokia 95

    Interesting. You may want to report this as a bug, see http://www.forum.nokia.com/I_Want_To...nical_Support/

    I'm moving this to the Java forums as it is not an LBS issue and all those working with SVG would like know about the problem and its workaround.
    -- Lucian

    If you are not yet a DVLUP member it is time to correct that mistake :) Click here to join: http://www.dvlup.com/lucian/Invite

Similar Threads

  1. which phones for laptop
    By dvdljns in forum PC Suite API and PC Connectivity SDK
    Replies: 2
    Last Post: 2006-02-14, 12:58
  2. Nokia Mobile VPN Client
    By marcyl in forum Symbian Networking & Messaging (Closed)
    Replies: 1
    Last Post: 2003-12-01, 14:47

Posting Permissions

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