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

Example.xml not being parsed #10

Open
ajhalls opened this issue Aug 14, 2018 · 4 comments
Open

Example.xml not being parsed #10

ajhalls opened this issue Aug 14, 2018 · 4 comments

Comments

@ajhalls
Copy link

ajhalls commented Aug 14, 2018

When trying to use the default Example.xml, I get this message:

Mapnik LOG> 2018-08-14 15:12:55:Mapnik LOG> 2018-08-14 15:12:55:  Unable to process some data while parsing '/usr/share/tirex/example-map/example.xml':
* attribute 'bgcolor' with value '#eeebe2' at line 2
* node 'CssParameter' at line 6Unable to process some data while parsing '/usr/share/tirex/example-map/example.xml':
* attribute 'bgcolor' with value '#eeebe2' at line 2
* node 'CssParameter' at line 6

If I update it with the start of the Mapnik.xml I get further, but still can't be parsed. It seems to prefer single quotes to double.

<?xml version='1.0' encoding='utf-8'?>
<!DOCTYPE Map[]>
<Map background-color='#aad3df' srs='+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over'>    <Style name='ocean'>
        <Rule>
            <PolygonSymbolizer>
                <CssParameter name='fill'>#b1d2f5</CssParameter>
            </PolygonSymbolizer>
        </Rule>
    </Style>
    <Layer name='ocean' status='on' srs='+proj=longlat +ellps=WGS84 +datum=WGS84 +no_defs'>
        <StyleName>ocean</StyleName>
        <Datasource>
            <Parameter name='type'>shape</Parameter>
            <Parameter name='file'>/usr/share/tirex/example-map/ocean</Parameter>
        </Datasource>
    </Layer>
</Map>

returns this error

Mapnik LOG> 2018-08-14 15:05:59: Unable to process some data while parsing '/usr/share/tirex/example-map/example.xml':
* node 'CssParameter' at line 6
tirex-backend-mapnik[11154]: added style 'mapnik' from map /etc/tirex/renderer/mapnik/example.conf
@stephankn
Copy link
Contributor

tirex works fine with OpenStreetMap carto generated XML. Maybe remove that example map completely?

@woodpeck
Copy link
Collaborator

OSM-Carto is a complex style that requires downloading lots of third-party data sources and populating a postgres database before it even works. Having a trivial style to test with is valuable. I'll look into making this work.

@josmmirror
Copy link

I have a simple line style (meant for my own GPS tracker display. Maybe that's an alternative? With an standard OSM import it currently displays all roads.

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map[]>
<Map background-color="#00000000" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0.0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
  <Parameters>
    <Parameter name="scale">1</Parameter>
    <Parameter name="metatile">2</Parameter>
    <Parameter name="name">lines</Parameter>
    <Parameter name="description">lines</Parameter>
    <Parameter name="bounds">-180,-85.05112877980659,180,85.05112877980659</Parameter>
    <Parameter name="center">0,0,4</Parameter>
    <Parameter name="format">png</Parameter>
    <Parameter name="minzoom">10</Parameter>
    <Parameter name="maxzoom">22</Parameter>
  </Parameters>
  <Style filter-mode="first" name="lines">
    <Rule>
      <LineSymbolizer stroke="#0000ff" stroke-linecap="round" stroke-linejoin="round" stroke-width="1" />
    </Rule>
  </Style>
  <Layer name="lines">
    <StyleName>lines</StyleName>
    <Datasource>
      <Parameter name="type">postgis</Parameter>
      <Parameter name="dbname">osm</Parameter>
      <Parameter name="geometry_field">way</Parameter>
      <Parameter name="extent">-20037508,-20037508,20037508,20037508</Parameter>
      <Parameter name="table">(SELECT way FROM planet_osm_line WHERE highway IS NOT NULL) AS lines</Parameter>
    </Datasource>
  </Layer>
</Map>

@stoecker
Copy link
Contributor

Ooops, wrong account ;-)

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

5 participants