You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MapML, like HTML, is a hypertext format. Among other things, this means that it has embedded links to resources, particularly images, tiles and other MapML documents which compose a map layer.
SVG, also a hypertext format, is affected by the Same Origin Policy in the way that when it is loaded by the <img src="test.svg" width="100" height="100"> tag, resources that it links to are not loaded, regardless of origin. For example, this HTML document:
The same relationship exists between a MapML document and remote resources, except it is more important for MapML, because virtually everything is drawn by compositing external resources onto the map canvas.
This will mean that the proposed <layer src="test.mapml"> will have to negotiate an exception to this (mis-)application of the Same Origin Policy.
Hat tip to Amelia's book for bringing this to my attention.
The text was updated successfully, but these errors were encountered:
Since <layer> is a new element, I don't think there are any legacy expectations about what a document loaded with it can or can't do. Examples of existing HTML elements that load documents (SVG, HTML, other) which can then load other resources are <iframe>, <object>, and <embed>.
The limitations on <img> would only come into effect if you are hoping to be able to load an external MapML document as <img src="my.mapml" />.
That said, to go back to the original question of same-origin versus cross-origin, any new HTML element that loads external resources would need to use the crossorigin attribute.
For an element that loads fully-functional documents (which can in turn load other files or trigger interactive behavior), I suspect it will be easier to gain support if it also supports the modern sandboxing model used by the <iframe> element.
MapML, like HTML, is a hypertext format. Among other things, this means that it has embedded links to resources, particularly images, tiles and other MapML documents which compose a map layer.
SVG, also a hypertext format, is affected by the Same Origin Policy in the way that when it is loaded by the
<img src="test.svg" width="100" height="100">
tag, resources that it links to are not loaded, regardless of origin. For example, this HTML document:renders like this in chrome:
The content of test.svg is as follows:
The same relationship exists between a MapML document and remote resources, except it is more important for MapML, because virtually everything is drawn by compositing external resources onto the map canvas.
This will mean that the proposed
<layer src="test.mapml">
will have to negotiate an exception to this (mis-)application of the Same Origin Policy.Hat tip to Amelia's book for bringing this to my attention.
The text was updated successfully, but these errors were encountered: