camptocamp / ngeo

Library combining OpenLayers and AngularJS
https://camptocamp.github.io/ngeo/master/examples
MIT License
135 stars 87 forks source link

Difficult to query points on NGEO mobile 2.2.0rc2 #2713

Closed gnerred closed 7 years ago

gnerred commented 7 years ago

It is much more difficult to query a point from a mobile device on NGEO mobile 2.2.0rc2 than on 2.1.7...

Version 2.2.0rc2 - Difficult to query an orange point : https://preprod.cartoriviera.ch/mobile/theme/cadastre?lang=fr&tree_group_layers_mobilite=points_vente_vmcv%2Ctp_arret_bus%2Ctp_ligne_bus%2Ctp_arret_train%2Ctp_ligne_train&baselayer_ref=asitvd.fond_gris&map_x=555433&map_y=145317&map_zoom=9&theme=cadastre&tree_group_layers_amenagement_du_territoire=camac%2Ccamac_termine&tree_groups=cadastre%2Ccouverture_du_sol%2Cqgis_server&tree_group_layers_cadastre=batiments_egid

Version 2.1.7 - Easy to query an orange point : https://map.cartoriviera.ch/mobile/theme/cadastre?lang=fr&tree_group_layers_mobilite=points_vente_vmcv%2Ctp_arret_bus%2Ctp_ligne_bus%2Ctp_arret_train%2Ctp_ligne_train&baselayer_ref=asitvd.fond_gris&map_x=555433&map_y=145317&map_zoom=9&theme=cadastre&tree_group_layers_amenagement_du_territoire=camac%2Ccamac_termine&tree_groups=cadastre%2Ccouverture_du_sol%2Cqgis_server&tree_group_layers_cadastre=batiments_egid

gnerred commented 7 years ago

Someone could please take a look ? This is a really annoying issue. Thanks

fredj commented 7 years ago

Does it change when you change the tolerance value ? https://github.com/camptocamp/cartoriviera_geomapfish/commit/f1955239958b3ba360ddd42ab1dbbcc4baf2e603

fredj commented 7 years ago

BTW you should move this to mobile.html; this way you don't have to recompile the js code when changing the value

gnerred commented 7 years ago

Yes it is better if I increase this value. But why is the behaviour different between 2.1 and 2.2 with the same value ?

fredj commented 7 years ago

it is caused by an upgrade of OpenLayers and it's related to https://github.com/openlayers/openlayers/issues/6776

We should probably change the default value in ngeo

fredj commented 7 years ago

The tolerance has already been increased for the mobile interface: https://github.com/camptocamp/ngeo/blob/master/contribs/gmf/src/controllers/abstractmobile.js#L33-L35