Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unknown child node: Map > Parameters #68

Closed
cspanring opened this issue Jun 13, 2012 · 5 comments
Closed

Unknown child node: Map > Parameters #68

cspanring opened this issue Jun 13, 2012 · 5 comments

Comments

@cspanring
Copy link

I'm actually not sure if this is a TileStache, Mapnik or TileMill issue, but TileStache (1.31.1, Mapnik 2.0.1+dev20120518) threw an error

.../Providers.py", line 262, in renderArea
mapnik.load_map(self.mapnik, str(self.mapfile))
RuntimeError: Unknown child node in 'Map': 'Parameters'

...when I added a recent Mapnik XML created with TileMill with a <Parameters /> element right after the <Map> opening tag. Removing the <Parameters /> solved it.

@migurski
Copy link
Contributor

Sounds like a Mapnik version mismatch. I'm not sure I've ever seen a Parameters right inside of Map, maybe @springmeyer can shed some light on this?

@springmeyer
Copy link
Contributor

The <Parameters/> element (as a subelement of the <Map>) is new in Mapnik 2.1.x, and is basically a container to stash arbitrary key:value pairs (mapnik/mapnik#977). TileMill started leveraging this in 0.9.1. This means that stylesheets written by Mapnik 2.1.x that use this feature will break if loaded by older versions of Mapnik, which is the problem in this case. It is safe to remove them when you hit this - it is not ideal at all that this creates a breakage, so I will give thought to how/where to avoid this.

@migurski
Copy link
Contributor

Thanks Dane!

Can Tilemill be asked to output older versions of the Mapnik XML?

@springmeyer
Copy link
Contributor

No, TileMill cannot be ask to output older Mapnik XML. But the stable Mapnik 2.0.x series can be made to be kinder in situations like this, which I have just done. See mapnik/mapnik#1286.

I don't see any other fix other than recommending users of TileMill and TileStache together run either the upcoming Mapnik 2.0.2 or Mapnik 2.1.x.

@cspanring
Copy link
Author

Fixed in recent (>= 2.2) Mapnik versions.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants