Hi, I am certain this is because I don't understand OSM well enough yet. Mostly I am looking for more examples of base-layers.js.
The default basemap from BingMaps is too basic. For example, it doesn't show the buildings, which I do see on OSM (https://www.openstreetmap.org/export#map=17/22.28293/114.13540). I do not for example, see how to find a url that ends in .png, as the documentation suggests. I have also tried to use mapbox, thinking that might be better. In general, I am confused about whether I need to set up my own tileserver and whether how I go about finding the correct URL to use. This would also extend to adding and remove elements on the map. I have tried to add the following to my base-layers.js, but it is not working. I am also running "python manage.py collectstatic" each time, assuming that is needed to make sure my changes compile and get included. Any suggestions would be greatly appreciated. *base-layers.js:* define([ 'jquery', 'openlayers', 'underscore', 'arches' ], function($, ol, _, arches) { var baseLayers = arches.bingLayers; _.each(baseLayers, function(layer) { layer.layer = new ol.layer.Tile({ visible: false, preload: Infinity, source: new ol.source.BingMaps({ key: arches.bingKey, imagerySet: layer.id }) }); }); //set default map style to Roads baseLayers[0].layer.setVisible(true); baseLayers.push({ id: 'hku-map', name: 'HKU OSM', icon: arches.urls.media + 'img/map/an_example.png', layer: new ol.layer.Tile({ visible: false, source: new ol.source.XYZ({ //url: 'https://www.openstreetmap.org/way/31853930#map=17/22.28291/114.13676' url: 'https://api.mapbox.com/styles/v1/1000camels/cikq7mx1l001698m9m2kgicfu.html?title=true&access_token=pk.eyJ1IjoiMTAwMGNhbWVscyIsImEiOiJjaWtuaTAybm4wc25hdHpqNzVsOW44cTFxIn0.L2-D4bbSSLnv64N92vKUyQ#16.375201114760873/22.283472227128584/114.1371841696241/0' }) }) }); baseLayers[1].layer.setVisible(true); return baseLayers; }); -- -- To post, send email to [email protected]. To unsubscribe, send email to [email protected]. For more information, visit https://groups.google.com/d/forum/archesproject?hl=en --- You received this message because you are subscribed to the Google Groups "Arches Project" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
