[OpenLayers-Dev] Format.WMC questions

Trond Michelsen trondmm-openlayers at crusaders.no
Fri Jul 10 07:28:06 EDT 2009


I'm currently working on adding parsing and writing of the remaining
elements of Web Map Context documents, and there's something here that
caught my eye.

In read_wmc_MetaDataURL and read_wmc_LegendURL, the content of the
OnlineResource element is read like this:

  var links = node.getElementsByTagName("OnlineResource");
  if(links.length > 0) {
    this.read_wmc_OnlineResource(legend, links[0]);

But afaict, this.runChildNodes(legend, node); should do the same. The
only difference would be if there are more than one OnlineResource
elements within the LegendURL og MetaDataURL elements, and there
shouldn't be.

Are there any particular reasons why these methods don't just call
runChildNodes()? Should the methods for LogoURL, DescriptionURL and
DataURL read the OnlineResource the same way, or is it OK that I use
runChildNodes() in all methods?

Also, there's a read_wmc_LatLonBoundingBox() method, but I can't find
any LatLonBoundingBox element in the WMC standard. If it's OK, I'll
just delete this method.

Trond Michelsen

More information about the Dev mailing list