[
https://issues.apache.org/jira/browse/OFBIZ-9991?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16263909#comment-16263909 ]
Jacques Le Roux edited comment on OFBIZ-9991 at 11/23/17 4:19 PM:
------------------------------------------------------------------
I tried to use OpenLayers-4.5.0.js but it did not work as is.
I then tried in GeoLocation.ftl to follow the officially way to use the
Official OSM tileset as protocol-independent URLs
{code}
- map.addLayer(new OpenLayers.Layer.OSM());
+ <#-- Official OSM tileset as protocol-independent URLs -->
+ <#noparse>
+ map.addLayer(new OpenLayers.Layer.OSM(['//a.tile.openstreetmap.org/${z}/${x}/${y}.png', '//b.tile.openstreetmap.org/${z}/${x}/${y}.png', '//c.tile.openstreetmap.org/${z}/${x}/${y}.png']));
+ </#noparse>
{code}
But, for a reason I did not get, it did not work either.
Out of desperation I fixed it a r1816105 by using a modified "OpenLayers-2.13.1-modified-for-CSP-.js" lib
I did not backport because of conflict, it's minor anyway.
I also spotted several CSP issues, (almost?) all related with js libs. It's easy to see when looking at browsers tools console... This is still a WIP at OFBIZ-6766...
was (Author: jacques.le.roux):
I tried to use OpenLayers-4.5.0.js but it did not work as is.
I then tried in GeoLocation.ftl to follow the officially way to use the
Official OSM tileset as protocol-independent URLs
- map.addLayer(new OpenLayers.Layer.OSM());
+ <#-- Official OSM tileset as protocol-independent URLs -->
+ <#noparse>
+ map.addLayer(new OpenLayers.Layer.OSM(['//a.tile.openstreetmap.org/${z}/${x}/${y}.png', '//b.tile.openstreetmap.org/${z}/${x}/${y}.png', '//c.tile.openstreetmap.org/${z}/${x}/${y}.png']));
+ </#noparse>
But, for a reason I did not get, it did not work either.
Out of desperation I fixed it a r1816105 by using a modified "OpenLayers-2.13.1-modified-for-CSP-.js" lib
I did not backport because of conflict, it's minor anyway.
I also spotted several CSP issues, (almost?) all related with js libs. It's easy to see when looking at browsers tools console... This is still a WIP at OFBIZ-6766...
> OpenStreetMap geolocation no longer works
> -----------------------------------------
>
> Key: OFBIZ-9991
> URL:
https://issues.apache.org/jira/browse/OFBIZ-9991> Project: OFBiz
> Issue Type: Bug
> Components: example
> Affects Versions: Trunk
> Reporter: Jacques Le Roux
> Assignee: Jacques Le Roux
> Priority: Minor
> Fix For: Upcoming Release
>
> Attachments: Screen Shot 2017-11-20 at 19.08.29.png
>
>
> Easily checked at
https://demo-trunk.ofbiz.apache.org/example/control/ExampleOsmGeoLocationPointSet1> It "works" but OpenStreetMap images are not showing. Locally there are no errors in log. So hopefully it could be just an OpenStreetMap setting change we need to do
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)