Results 1 to 2 of 2

Thread: Issues Embedding SVG file from a networkdrive to a client-side Webapplication

Hybrid View

  1. #1
    Join Date
    Apr 2012

    Issues Embedding SVG file from a networkdrive to a client-side Webapplication

    Hi my fellow developers,

    this here is my first post. I am currently working on a Webbased application which loads and manipulates SVG graphics. The key functions are selection, zooming, panning, etc.
    At first I embeded my SVG graphics with the help of the "object" tag.
    Like this:
    <object border="2" align="middle" id="objectElement" data='y:/mySVG.svg' type="image/svg+xml" style="border: 1px black solid;"/>

    in the head of my SVG I got a onload function called SvgLoadReactor in which I can get and set all the events and attributes of my SVG.
    <svg enableZoomAndPanControls="true" preserveAspectRatio="xMinYMin meet" xmlns="http://www.w3.org/2000/svg" viewBox="29.0784 -85.9536 56.8752 61.5005" width="30cm" height="20cm" onload="JavaScript:try{parent.SvgLoadReactor(evt)}catch(ex){alert(ex);}">

    This method works fine if I load the file from my local drive. But when I attempt to load the file from the network drive I get to see the graphic, but all my mouseevents stopped working.
    I get the error Acces Denied when loading from the network drive.

    After many tries I decided to load the file contend via ActiveX and then write the entire content into a div.
    This method works great when using IE9. With that I can now load any SVG file from anywhere.

    Now this is where I begin to explain my current problem.
    My WebApplicaton should later be a part of another Windows application which uses a Webbrowser Control to run WebApps. Webbrowser Control are by default in IE7-mode which is incompatible with the <svg> tag. To get around this issue I just used this:
    <meta http-equiv="X-UA-Compatible" content="IE=edge">. I now can see my graphic, I am able to pan and zoom, but now I can't select individual polygons and the program crashes every few seconds.

    As a test I tried out the app using the embedding via the object tag and all functions work out perfectly. But using this I still have the big trouble not being able to load my SVG files from the network drive.

    I hope you guys get the dilemma I am currently in. I would be glad to hear any ideas or suggestions

  2. #2
    Join Date
    Apr 2012
    I just solved the issue. It turns out that I just had too many events going on at once. My solution was just to regulate the events in way so that they all don't occur at once.

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Posting Permissions

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