Answered by:
mapcontrol.ashx:149 Uncaught Error: DISPATCH_REQUEST_ERR:DOM Events Exception 1

Question
-
Hello Experts,
I have a simple photo display on the map which uses the GeoRSS xml format
<?xml version="1.0" ?> <rss version="2.0" xmlns:georss="http://www.georss.org/georss" > <channel> <title>Mytest-Map</title> <description>Mytest-Map using Virtual Earth and Slide.Show</description><br/> <item> <title>Rome</title> <description> <![CDATA[<iframe src="./SlideShow/Mytest.htm" width="100%" height="95%" style="border-top-color:#000000; border-left-color:#000000;<br/>border-right-color:#000000; border-bottom-color:#000000; border-width:1px; border-style:solid; padding:0px"></iframe>]]> </description> <georss:point>44.456637 13.494564625</georss:point> </item>
Which calls test.html having code
<script type="text/javascript" src="../JS/Silverlight.js"></script> <script type="text/javascript" src="../JS/SlideShow.js"></script> </head> <body> <script type="text/javascript"> new SlideShow.Control(new SlideShow.XmlConfigProvider({ url: "testConfig.xml" })); </script>
TestConfig.xml is
<?xml version="1.0" encoding="utf-8" ?> <configuration width="100%" height="100%" background="Silver"> <modules> <module type="SlideViewer" /> <module type="ProgressBar" /> <module type="SlideDescription" /> <module type="NavigationTray" /> </modules> <transitions> <transition type="FadeTransition" name="CrossFadeTransition" /> <transition type="WipeTransition" name="WipeRightTransition"> <option name="direction" value="Right" /> </transition> </transitions> <dataProvider type="XmlDataProvider"> <option name="url" value="TestData.xml"></option> </dataProvider> </configuration>
The Test Data.xml is
<?xml version="1.0" encoding="utf-8" ?> <data transition="CrossFadeTransition"> <album title="test" description="example" image="..Image/C50.JPG"> <slide title="Example1" description="1/0/2011" image="..Image/C50.JPG" thumbnail="..Image/C50.JPG" /> <slide title="Example2" description="1/0/2011" image="..Image/C51.JPG" thumbnail="..Image/C51.JPG" /> </album> </data>
this works perfectly fine with Internet Explorer 8 and 9, but fails to work with chrome, Firefox, and opera.I dont know how to resolve this, below attached image is the display of my JavaConsole in Chrome giving me Script error.
how do I get this working ?? I am desperately needing your advice so I can resolve this problem.
I have tried mapcontrol.ashx?v=6.2 and v=6.3 but it does not help, [and v=7.0 does not work on any]
I want to use 6.3 which is not a problem, but I need this to be sorted out in all browsers, please help me solve this problem
HeshtiTuesday, November 29, 2011 5:37 AM
Answers
-
Do a search for MiniMapSize in your code and ensure it is being defined. According to the error it's not and any code after that line will not be run. If you are loading the map on page load and setting this value on page load too it's possible the order of loading is different in each browser (not uncommon). Try putting in a break point in your code and check te value of that variable before it is being used.
http://rbrundritt.wordpress.com- Marked as answer by Ricky_BrundrittModerator Tuesday, January 10, 2012 7:14 PM
Tuesday, November 29, 2011 8:20 AMModerator
All replies
-
Do a search for MiniMapSize in your code and ensure it is being defined. According to the error it's not and any code after that line will not be run. If you are loading the map on page load and setting this value on page load too it's possible the order of loading is different in each browser (not uncommon). Try putting in a break point in your code and check te value of that variable before it is being used.
http://rbrundritt.wordpress.com- Marked as answer by Ricky_BrundrittModerator Tuesday, January 10, 2012 7:14 PM
Tuesday, November 29, 2011 8:20 AMModerator -
Hello Richard,
Thanks for your reply, I did change the value but there was no Change, it works for IE 8 and 9 but not for the others, can you tell me where am I going wrong ?
below is my JS that I use
Thankswindow.onload = GetMap; window.onresize = Resize; var map = null; var mapWidth = null; var mapHeight = null; //VEShapeLayer var ttPhotos = new VEShapeLayer(); function GetMap() { map = new VEMap('divMap'); //Load and resize the map map.LoadMap(new VELatLong(13.6, 52.33), 0, VEMapStyle.Hybrid, false); map.AttachEvent("onresize", MapResize); Resize(); //Set Title for VEShapeLayer ttPhotos.SetTitle('ttPhotos'); //Loading Photo-GEORSS var layerSpec = new VEShapeSourceSpecification(VEDataType.GeoRSS, './GeoRSS/Photos.xml', ttPhotos); map.ImportShapeLayerData(layerSpec, onFeedLoad); } function GetInfo() { alert('The latitude,longitude at the center of the map is: ' + map.GetCenter()); } function MapResize(e) { // When the map is resized, Realign the position of the Mini Map RealignMiniMap(); } function RealignMiniMap() { var minimap = document.getElementById("MSVE_minimap"); var xoffset = (GetMapWidth() - minimap.offsetWidth); map.ShowMiniMap(xoffset, 0, MiniMapSize.Small); document.getElementById("MSVE_minimap_resize").style.display = "none"; } function GetMapWidth() { // Width as an integer return document.getElementById("divMap").offsetWidth; } function GetMapHeight() { // Height as an integer return document.getElementById("divMap").offsetHeight; } function Resize() { var mapDiv = document.getElementById("divMap"); var windowWidth = document.body.clientWidth; var windowHeight = document.body.clientHeight; mapWidth = windowWidth - 290; mapHeight = windowHeight - 100; mapDiv.style.width = mapWidth + "px"; mapDiv.style.height = mapHeight + "px"; map.Resize(mapWidth, mapHeight); map.ShowMiniMap(mapWidth - 205, 13, VEMiniMapSize.Large); } function onFeedLoad(layer) { var numShapes = layer.GetShapeCount(); map.ClearInfoBoxStyles(); for (var i = 0; i < numShapes; ++i) { var s = layer.GetShapeByIndex(i); s.SetCustomIcon('./IMG/MyImage.png'); } function DoZoomIn(c) { map.ZoomIn(); } function DoZoomOut() { map.ZoomOut(); } function DoZoom() { var zoom = document.getElementById('zoomLevel').value; map.SetZoomLevel(zoom); }
HeshtiTuesday, November 29, 2011 11:33 AM