geoadmin / mf-chsdi3

api3.geo.admin.ch source code
https://api3.geo.admin.ch
Other
33 stars 15 forks source link

Shift highlight geometry #2263

Closed p1d1d1 closed 7 years ago

p1d1d1 commented 7 years ago
  1. Go here: https://s.geo.admin.ch/6ee4a7b35f
  2. Click on a feature --> the highlight geometry is shifted

Affected browser: IE11

Affected layers:

loicgasser commented 7 years ago

Not browser specific. Wrong grids in the background

loicgasser commented 7 years ago

I think the Wms source is shifted...

AFoletti commented 7 years ago

I can't reproduce in any browser... @loicgasser did you already fix that?

gjn commented 7 years ago

I can't reproduce. Can you attach a screenshot and the exact IE browsers version?

p1d1d1 commented 7 years ago

image

gjn commented 7 years ago

Strange:

image

Maybe caching issue of your browser?

AFoletti commented 7 years ago

in @p1d1d1' image the highlight looks right (same and @gjn ) while the WMS image looks slightly shifted. I think we had someting similar with the zoom settings in the browser. @p1d1d1 could you check if you are using 100% zoom?

loicgasser commented 7 years ago

I can reproduce on chrome on my phone screenshot_20161013-093837

AFoletti commented 7 years ago

wow, that's a very big shift

gjn commented 7 years ago

Browser zoom might be it. I can reproduce when I have browser zoom != 100%.

To me, this is minor bug as it's been like this since a long time and we never had bad feedback.

@p1d1d1 Can you adapt the original bug description to include that it's browser zoom related?

AFoletti commented 7 years ago

Tested on Chrome on my wife's smartphone (sony xperia E1). The more I zoom out, the more shift I get

p1d1d1 commented 7 years ago

@gjn for sure a minor, BTW I can reproduce at whatever zoom level.

gjn commented 7 years ago

I elevate this, because it not only affects the selection. But it also affects actual data where source is wms. This is a not-go.

It was just reported today by Adrian Wicht from the field, that they have the same behaviour with lfp2 layer: Testlink

The point 12022110 should always be in swiss territory, but goes to france when client zoom is active.

@oterral Can you have a look?

AFoletti commented 7 years ago

As info: the issues does not look to affect layers coming from the WMS-import tool

Steps to reproduce:

ltclm commented 7 years ago

seems to be related to the devices dpi. if i open this link on a macbook with retina display i can confirm the offset, if i open it on my office laptop, there is no offset.

https://map.geo.admin.ch/?topic=ech&lang=de&bgLayer=ch.swisstopo.pixelkarte-farbe&layers=ch.swisstopo.swissimage-product,ch.swisstopo.images-swissimage.metadata&X=265067.45&Y=652296.05&zoom=4

oterral commented 7 years ago

@ltclm is right probably a pixel ratio issue. I can reproduce on the mac

gjn commented 7 years ago

WMS requests are affected. Maybe wms request is not constructed correctly. Not sure if singleTile WMS is also affected or only tiled WMS.

loicgasser commented 7 years ago

can you reproduce with pure ol3?

oterral commented 7 years ago

Not with master http://openlayers.org/en/master/examples/wms-custom-proj.html

oterral commented 7 years ago

It seems it's the gutter property which is responsible.

loicgasser commented 7 years ago

yes can't reproduce with single tile. Single tile (click add)

oterral commented 7 years ago

Issue in ol https://github.com/openlayers/ol3/issues/6001

oterral commented 7 years ago

Fix ready https://github.com/openlayers/ol3/pull/6002

gjn commented 7 years ago

Just discussed with Fred, will be in next ol3 release.

oterral commented 7 years ago

@gjn do you want I deploy an emergency fix with the trick fedj told me in openlayers/ol3#6001.

serverType: 'mapserver'

gjn commented 7 years ago

No. It's been like this since quite some time, affects WMS layers only and only on certain browsers.

I think we can wait for next ol3 release and update.

oterral commented 7 years ago

ok

gjn commented 7 years ago

This is fixed on prod now.