none
Bing Map With XSL .net 1.1

    Question

  • Hi,

    I am using Bing Map APi with XSL in .Net 1.1 framework. Map gets render fine on IE 6,7,8 but it does not work on IE9 and any other browser. I tried following steps to identify the issue

    • If I copy the view source of my page and store it in html format in directory where aspx files are it map get rendered in every browser.
    • Kept the xsl code very simple but still it does not work with mt actual solution. But creating a sample application on framework 2.0 and above it works. It says BING need .net framework 2.0 and above but how come its works on IE 8 with 1.1?
    • With 1.1 the code get into infinite loop of LoadMap function of Bing api with other browsers.
    • I tried the same code of 1.1 on different environment it works , thus it means an environment issue?
    <?xml version="1.0" encoding="utf-8"?>
    <xsl:stylesheet version="1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
      <xsl:output method="html"/>
      <xsl:template match="/">
        <html>
          <head>
            <title>Footballer's XSLT Demo</title>
            <script type="text/javascript" src="http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=6.3"></script>
            <script type="text/javascript">
              var myMap = null;
              function LoadMap()
              {
              myMap = new VEMap("mapDiv");
              myMap.LoadMap();
              }
              function UnloadMap()
              {
              if (myMap != null) {
              myMap.Dispose();
              }
              }
            </script>
          </head>
          <body onload="LoadMap()" onunload="UnloadMap()">
            <h2>Footballer's Information</h2>
            <br/>
            <br />
            <table bgcolor="#008BE7" border="1" cellpadding="5">
        
           
              <tr>
                <td style="position:relative;width:640px;height:480px;" id="mapDiv"/>
              </tr>
            </table>
          </body>
        </html>
      </xsl:template>
     
    </xsl:stylesheet>

    Please help me in resolving the issue, i am trying very hard fix it.

    Thanks

    Hydchd

    Thursday, March 01, 2012 6:07 AM

Answers

All replies

  • Might just be me but I really confused what you are trying to do here? The API you are using (which by the way is the old version its now v7) is a javascript API that doesnt care about server side technologies at all?

    Secondly what are you trying to achieve in running XSLT directly in a browser? Seems odd as XSLT is for transforming XML?



    Brian @ Earthware - UK interactive mapping web developers http://www.earthware.co.uk/blog | http://www.twitter.com/earthware | Windows Live Developer MVP

    Thursday, March 01, 2012 7:42 PM
  • Also note that the code sample is missing the proper doctype and metatag as documented here: http://msdn.microsoft.com/en-us/library/gg427624.aspx

    As for your issue it's possible that the file has the wrong content-type defined in the header of the file when being downloaded to the browser. The content type should be text/xml, if it is text/html then it will not work correctly in all browsers.


    http://rbrundritt.wordpress.com

    Friday, March 02, 2012 3:30 PM
  • Also note that the code sample is missing the proper doctype and metatag as documented here: http://msdn.microsoft.com/en-us/library/gg427624.aspx

    As for your issue it's possible that the file has the wrong content-type defined in the header of the file when being downloaded to the browser. The content type should be text/xml, if it is text/html then it will not work correctly in all browsers.


    http://rbrundritt.wordpress.com

    Thanks for replying , I tried the proper doctype and metatag still it doesnot work.
    Sunday, March 11, 2012 4:08 AM