Current filter:
                                You should refresh the page.
                                  • Hi, I used one of your ASP.NET templates to create a website.
                                    The site is on line since two months without any problem but today I realized that something has changed because the openlayers map is not showed in one of the pages.
                                    On localhost it appears but when on the web server there is a blank panel instead until I force the browser to navigate without https.
                                    This is the code.

                                    [ASPx]
                                    <script src="http://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script> <script src="http://openlayers.org/en/v3.18.2/build/ol.js"></script> <script type="text/javascript"> (function(){ var location = ol.proj.fromLonLat([12.4805646, 41.8273937]); var map = new ol.Map({ layers: [ new ol.layer.Tile({ source: new ol.source.OSM() }), getMarkerLayer() ], target: 'map', controls: ol.control.defaults(), interactions: ol.interaction.defaults({ mouseWheelZoom: false }), view: new ol.View({ center: location, zoom: 15 }) }); function getMarkerLayer() { var iconFeature = new ol.Feature({ geometry: new ol.geom.Point(location), }); var iconStyle = new ol.style.Style({ image: new ol.style.Circle({ radius: 15, fill: new ol.style.Fill({ color: 'rgba(255,51,0,0.9)' }) }) }); iconFeature.setStyle(iconStyle); var vectorSource = new ol.source.Vector({ features: [iconFeature] }); return new ol.layer.Vector({ source: vectorSource }); } })(); </script>
                                    you can find attached a set of screenshot.
                                    There is something I can do to solve this issue?
                                    Thank you very much.

                                    Max

                                1 Solution

                                Creation Date Importance Sort by

                                Hello,

                                The issue is not related to our components. It is rather related to the fact that OpenLayers maps do not work properly with SSL. I suggest you search for possible solutions on public resources. Here are some links I have found:
                                OpenLayers maps issue with SSL
                                Using Stamen tiles in OpenLayers map over HTTPS
                                HTTPS access for OpenLayers.js?

                                If you have any difficulties with our components, please feel free to contact us.


                                Best regards,
                                Stanley
                                • Max Pecoraro 05.17.2018
                                  Hi Stanley, thanks for your links.
                                  I post the solution hoping that it can be helpful for other users and/or the people in DevExpress responsable for the templates.

                                  I changed the script from

                                  [ASPx]
                                  <script src="http://cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script> <script src="http://openlayers.org/en/v3.18.2/build/ol.js"></script>
                                  to
                                  [ASPx]
                                  <script src="//cdn.polyfill.io/v2/polyfill.min.js?features=requestAnimationFrame,Element.prototype.classList,URL"></script> <script src="//openlayers.org/en/v3.18.2/build/ol.js"></script>

                                  This change made the map visible again (the zoom is still blocked but I will check a solution by myself).

                                  Thanks again, best regards

                                  Max

                                • Romeo (DevExpress Support) 05.17.2018
                                  Hi Max,

                                  We are happy to hear that you resolved the issue. And thank you for sharing your solution with us.

                                  Have a nice day!