OneDrive Developer Center (redirect)

Looking for the Live SDK?

OneDrive logo

The Live SDK 5.6 is now available

Find it on the OneDrive Dev Center, the new place to find samples, documentation, and other resources for integrating OneDrive into your app.
Choose your download

If you're using previous versions of the Live SDK, the Live SDK 5.5 reference is still available.

 none
Bing Map With XSL .net 1.1

    Întrebare

  • 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

    1 martie 2012 06:07

Răspunsuri

Toate mesajele

  • 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

    1 martie 2012 19:42
    Moderator
  • 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

    2 martie 2012 15:30
    Proprietar
  • 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.
    11 martie 2012 04:08
OneDrive Developer Center (redirect)

Looking for the Live SDK?

OneDrive logo

The Live SDK 5.6 is now available

Find it on the OneDrive Dev Center, the new place to find samples, documentation, and other resources for integrating OneDrive into your app.
Choose your download

If you're using previous versions of the Live SDK, the Live SDK 5.5 reference is still available.