question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Undesired white background being added to dynamicMapLayer

See original GitHub issue
  • Browser and version:

All supported browsers;

  • Version of Leaflet (L.version):

1.6.0

  • Version of esri Leaflet (L.esri.VERSION):

2.3.3

Steps to reproduce the error:

  1. Add a dynamicMapLayer to a leaflet map with the following code:
this.mapServer = esri.dynamicMapLayer({
        f: 'image',
        url: URL_MAPSERVER,
        transparent: true,
        maxZoom: DEFAULT_CONFIG.maxZoom,
        minZoom: DEFAULT_CONFIG.minZoom,
        layers: [0, 1, 2, 3, 4, 5]
      })

What happens is: every layer my ArcGIS MapServer provides are rendered with an opaque white background layer below them. Captura de tela de 2020-03-17 11-55-46

According to Firefox’s network tab in developer options, the image returned by the ArcGIS service for the aforementioned screenshot is: export

I was expecting: esri-leaflet to render my layers just like AGOL does. Captura de tela de 2020-03-17 12-15-54

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:12 (7 by maintainers)

github_iconTop GitHub Comments

1reaction
jgravoiscommented, Mar 17, 2020

would it help to just default to "png32" 🤷‍♂

1reaction
jwasilgeocommented, Mar 17, 2020

@teofilosalgado also what format is being used? Default of esri-leaflet should be 'png24' but the white background makes me wonder if a 'jpg' format is being used.

Read more comments on GitHub >

github_iconTop Results From Across the Web

How to remove white Background of Map Service mxd
Solved: One of my map layers is showing a white background. The background on the mxd has been set to a different color...
Read more >
NPGeoMap Properties Dialog > Dynamic Map Layer ...
Set coordinates for Dynamic Polygons. This is one out of two procedures for setting Dynamic Map coordinates - see details of both in...
Read more >
https://www.unpkg.com/arcgis-js-api@4.16.2/index.d.ts
When using an [Esri basemap](https://developers.arcgis.com/javascript/latest/api-reference/esri-Map.html#basemap), the default spatial reference is Web ...
Read more >
New Layer NOT Transparent!?!? How to Change White ...
Trying to change the white background to transparent on your new layers? Creating new layers and they are filled with white ?
Read more >
L.esri.DynamicMapLayer | Esri Leaflet - ArcGIS Developers
It is possible to control which specific layers from the Map Service are displayed using the layers constructor option. Map Service urls do...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found