GithubHelp home page GithubHelp logo

Comments (8)

RandomEtc avatar RandomEtc commented on September 2, 2024

Can you confirm that this is necessary if the doctype is set as you point out in issue #49 ? I've tested successfully in IE9 without messing with namespaces but I haven't been closely following the latest revisions.

from polymaps.

jonfrost avatar jonfrost commented on September 2, 2024

The SVG namespace will be required for SVG to be viewed. It is just a core requirement of SVG according to the SVG specification, and according to most viewers.
I wasn't able to test this though because I see that with the IE9 branch version "simplegeo-polymaps-v1.6.2-34-g846d253" the doctype is specified, however, the Bing and Nasa samples (and probably others) don't appear to be loading in the SVG element at all in both FireFox and IE9, so something in this build is critically broken.

from polymaps.

jonfrost avatar jonfrost commented on September 2, 2024

The IE9 branch doesn't appear to run in Opera 11 either. If you could get the IE9 branch running in FFox or Opera then I can try to get it working in IE9. I'm just at a loss right now as to where to start. Thanks

from polymaps.

RandomEtc avatar RandomEtc commented on September 2, 2024

I'll try to get the IE9 branch working in Firefox tonight, stand by.

Looking more closely at the namespace code, I note that po.svg() is used to create an svg element as a container in the examples and throughout the main polymaps code to create vector graphics and images. It creates svg elements with a namespace:

https://github.com/simplegeo/polymaps/blob/master/src/Svg.js
https://github.com/simplegeo/polymaps/blob/master/src/ns.js

Is there something else we should be doing in order to be hygienic?

from polymaps.

jonfrost avatar jonfrost commented on September 2, 2024

Hmm, looks like something must be awry because when I view the DOM in the browser in Opera or IE's Developer tools, the namespace is missing in this and all of the other PolyMaps examples I have viewed, such as:
http://polymaps.org/ex/pale-dawn.html#12.00/37.7649/-122.4195

However, if you view the DOM for any of the SVG test suite files, you'll see the SVG namespace there - for example:
http://www.w3.org/Graphics/SVG/Test/20061213/svggen/color-prof-01-f.svg

Would be great if you have time to track that down, otherwise I can try this weekend. Thanks again, really cool stuff overall! Hope I can contribute some to it.

from polymaps.

RandomEtc avatar RandomEtc commented on September 2, 2024

Thanks for the extra details, I'll see if it's the same on Opera for Mac.

from polymaps.

RandomEtc avatar RandomEtc commented on September 2, 2024

It looks like in Opera (11.00 Mac) if you inspect the svg element's properties it does have a namespace set, it's just not displayed in the DOM viewer. The REPL confirms it:

>>> document.getElementsByTagName('svg')[0].namespaceURI
"http://www.w3.org/2000/svg"

Does the same happen in IE9's inspector/console?

That said, I've done a full review of the demos in Opera and almost all of them are buggy in some respect (mainly to do with the initial map size, everything seems fine if you resize the window).

Meanwhile I've merged from master onto the ie9 branch and tested a few examples using Firefox 4 beta 8 and Firefox 3.6 - both seem to work fine. Are there specific problems you're seeing? Any errors thrown?

from polymaps.

jonfrost avatar jonfrost commented on September 2, 2024

As you say, PolyMaps does run fine in FireFox 4.
Yes,the namespaceURI does appear in the DOM in IE9 with this query: document.getElementsByTagName('svg')[0].namespaceURI
I have some screenshots that show the script console errors in both IE9 and Opera.
In IE9 the error occurs on zooming and is:
SCRIPT438: Object doesn't support this property or method
polymaps.js, line 778 character 5

This is the code it has trouble with, so one of these variable might not be getting set in IE9 for some reason:
// set the layer transform
container.setAttribute("transform",
"translate(" + (mapSize.x / 2) + "," + (mapSize.y / 2) + ")"
+ (mapAngle ? "rotate(" + mapAngle / Math.PI * 180 + ")" : "")
+ (mapZoomFraction ? "scale(" + Math.pow(2, mapZoomFraction) + ")" : "")
+ (transform ? transform.zoomFraction(mapZoomFraction) : ""));

from polymaps.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.