camptocamp / ngeo

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

A permalink generated in CGXP doesn't work on NGEO mobile #2407

Closed gnerred closed 7 years ago

gnerred commented 7 years ago

Version 2.1.2.dev1

When I generate a permalink in CGXP desktop application, it cannot be opened on a mobile. Is it not supposed to work ? Try to open this permalink on a mobile device : https://preprod.cartoriviera.ch/v2/s/1Tvj

Otherwise, if I copy the permalink of the mobile app and I remove the "/mobile" part, it can be opened on CGXP application (remove manually the following /mobile) : https://preprod.cartoriviera.ch/v2/mobile/theme/cadastre?lang=fr&tree_group_layers_default_mobile_group=tp_arret_bus%2Ctp_arret_train%2Ctp_ligne_bus%2Ctp_ligne_train&baselayer_ref=plan_cadastral_201703&map_x=555440&map_y=145068&map_zoom=9&theme=cadastre&tree_groups=cadastre%2Ccouverture_du_sol&tree_group_layers_cadastre=limite_commune%2Cbatiments_projetes

ger-benjamin commented 7 years ago

openlayers (via the mobile application) search for a "plan_ville_201701" in "https://preprod.cartoriviera.ch/tiles/1.0.0/WMTSCapabilities_preprod.xml" But this layer doesn't exist. (I think it doesn't exist only in your v2 but exists in the v1).

Openlayers should log the error but it must go on

ger-benjamin commented 7 years ago

Edit: my previous comment is true but not related. The real problem came from the url.

https://preprod.cartoriviera.ch/v2/s/1Tvj = https://preprod.cartoriviera.ch/v2/wsgi/mobile/theme/default_mobile?tree_group_layers_couverture_du_sol&amp%3Bbaselayer_ref=plan_cadastral_201703&amp%3Btree_groups=cadastre%2Ccouverture_du_sol&amp%3Bmap_x=555468.19986547&amp%3Bmap_y=144993.94582527&amp%3Bmap_zoom=8&amp%3Btree_group_layers_cadastre=batiments_projetes%2Climite_commune&lang=fr&baselayer_ref=plan_cadastral_201703&tree_groups=default_mobile_group&tree_group_layers_default_mobile_group=tp_arret_bus%2Ctp_arret_train%2Ctp_ligne_bus%2Ctp_ligne_train

The values &amp%3B should be &

The issue https://github.com/camptocamp/ngeo/issues/2381 make the problem more difficult to understand

Update: Is seems to be related to c2cgeoportal (and its redirection system), not in ngeo

ger-benjamin commented 7 years ago

@sbrunner Closed With https://github.com/camptocamp/c2cgeoportal/pull/2865

gnerred commented 7 years ago

@fredj @ger-benjamin Version 2.1.2.dev4 This problem seems to not be solved... I have generate this short permalink in desktop : https://preprod.cartoriviera.ch/v2/s/kfp3 If I open this short permalink on a mobile device, it doesn't work... Please reopen.

ger-benjamin commented 7 years ago

It's look like you have not applied this modification in your desktop.html : https://github.com/camptocamp/c2cgeoportal/pull/2865/files#diff-11133886a53c4bf1a9faac6d2364dcd1

So, add a | n there: https://github.com/camptocamp/cartoriviera_geomapfish/blob/v2/cartoriviera/templates/desktop.html#L14

Normally, that was indicated in the ngeo.diff (it's a modification in the desktop.html, so it must be changed manually)

Can you try with that ?

gnerred commented 7 years ago

Yes with this correction it works thanks ! But I've not seen this in the ngeo.diff...