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

duplicate <layer> in xml #32

Open
knutole opened this issue Feb 26, 2016 · 2 comments
Open

duplicate <layer> in xml #32

knutole opened this issue Feb 26, 2016 · 2 comments

Comments

@knutole
Copy link
Contributor

knutole commented Feb 26, 2016

<Layer> appears twice. No need for it (although it gives no unexpected behavior).

<Map 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" buffer-size="128">
  <Style name="layer" filter-mode="first">
    <Rule>
      <RasterSymbolizer opacity="1"/>
    </Rule>
  </Style>
  <Layer name="layer" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
    <StyleName>layer</StyleName>
    <Datasource>
      <Parameter name="asynchronous_request">true</Parameter>
      <Parameter name="dbname">vkztdvcqkm</Parameter>
      <Parameter name="extent">402864.106950032 7884480.78770223,1373209.1869689 9401672.88315546</Parameter>
      <Parameter name="geometry_field">rast</Parameter>
      <Parameter name="host">postgis</Parameter>
      <Parameter name="max_async_connection">10</Parameter>
      <Parameter name="password">docker</Parameter>
      <Parameter name="srid">3857</Parameter>
      <Parameter name="table">file_dbmsllgyerkxatfldqvs</Parameter>
      <Parameter name="type">pgraster</Parameter>
      <Parameter name="user">systemapic</Parameter>
    </Datasource>
  </Layer>
  <Layer name="layer" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
    <StyleName>layer</StyleName>
  </Layer>
</Map>
@knutole
Copy link
Contributor Author

knutole commented Feb 26, 2016

map.toXML() pre-cartoRenderer:
<?xml version="1.0" encoding="utf-8"?>
<Map srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over" buffer-size="128">
  <Layer name="layer" srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
    <StyleName>layer</StyleName>
    <Datasource>
      <Parameter name="asynchronous_request">true</Parameter>
      <Parameter name="dbname">vkztdvcqkm</Parameter>
      <Parameter name="extent">402864.106950032 7884480.78770223,1373209.1869689 9401672.88315546</Parameter>
      <Parameter name="geometry_field">rast</Parameter>
      <Parameter name="host">postgis</Parameter>
      <Parameter name="max_async_connection">10</Parameter>
      <Parameter name="password">docker</Parameter>
      <Parameter name="srid">3857</Parameter>
      <Parameter name="table">file_upexsvwtsrzrgmhclxlq</Parameter>
      <Parameter name="type">pgraster</Parameter>
      <Parameter name="user">systemapic</Parameter>
    </Datasource>
  </Layer>
</Map>

XML created by cartoRenderer:

<?xml version="1.0" encoding="utf-8"?>
<!DOCTYPE Map[]>
<Map 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="layer" filter-mode="first">
  <Rule>
    <RasterSymbolizer opacity="1" />
  </Rule>
</Style>
<Layer name="layer"
  srs="+proj=merc +a=6378137 +b=6378137 +lat_ts=0.0 +lon_0=0.0 +x_0=0.0 +y_0=0 +k=1.0 +units=m +nadgrids=@null +wktext +no_defs +over">
    <StyleName>layer</StyleName>  </Layer>

</Map>

So it seems the double layer is simply a result of concat of existing xml and added xml.

@knutole
Copy link
Contributor Author

knutole commented Feb 26, 2016

We'll get our hands dirty with multiple layers with systemapic/wu#331, so deferring this until then.

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

1 participant