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.
<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.
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
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.
Users Browsing this Thread
There are currently 1 users browsing this thread. (0 members and 1 guests)