Esri / angular-esri-map

A collection of directives to help you use Esri maps and services in your Angular applications
https://esri.github.io/angular-esri-map/
Apache License 2.0
213 stars 107 forks source link

SimpleFillSymbols with "pattern" and PictureFillSymbols fail to draw fill with using <base> tag #324

Closed fspataro-zz closed 7 years ago

fspataro-zz commented 7 years ago

Expected behavior

PictureFillSymbols and SimpleFillSymbols with a hatch fill setting (ie STYLE_HORIZONTAL) draw correctly when using the tag for RouteProvider and/or LocationProvider

Actual behavior

Non-functioning: In MS Edge, Safari on Mac and iOS the fill is solid black (no hatch or picture).
In FireFox on Windows & Mac the fill is completely empty (no hatch or picture).

Functioning: In Chrome on Windows & Mac and MS IE 11, the fill hatch or picture displays as expected.

I've stripped most of everything out of the my code in trying to nail down the issue, and it appears to be as simple as adding or removing the element.

Steps to reproduce the behavior

This is hard to setup in Plunker b/c the tag needs to know the actual root directory of the website/app. I was able to reproduce it using the graphic example in V1 but Plunker appear to create a new virtual directory each time it's accessed so it's not a stable example. I setup the example on my dev server here:

http://carto.yourdatasmarter.com/issues/pfsa/index.html

This is the faulty version. The only difference between this and working version on the examples site is the tag on line #5 in index.html. Removing this line, fill pictures draw correctly.

  1. Load URL in various browsers
  2. Select the "Polygon" or "Freehand Polygon"
  3. Draw on screen.

FireFox:

image

MS Edge (Safari produces same result)

image

Comparing FireFox SVG with Chrome SVG

image

jwasilgeo commented 7 years ago

@fspataro this is an interesting catch!

I was able to isolate it to JSAPI 3.x and your use of a <base href="..."> tag, so I think we can rule out angular-esri-map as doing something odd here.

I recommend:

  1. Copy this sample locally: https://developers.arcgis.com/javascript/3/jssamples/graphics_add.html
  2. Add your <base href="..."> tag as normal
  3. See that it has the same behaviour (it did for me in Edge)
  4. Submit this info to the JSAPI team by using the "Report and error on this page" email link at the bottom of the JSAPI sample page.
fspataro-zz commented 7 years ago

Thanks for the quick response @jwasilgeo !!!

Yes I'm seeing the issue in the stock JSAPI sample as well by just adding the tag. Sorry I should have checked that once I isolated it but I've only ever used that tag for angular apps so I just assumed it was an angular issue. I'll add any notes I get from the JSAPI team here, in case anyone else runs across the issue.