Hot answers tagged

1

You can use L.control, but there are only 4 positions: //logo position: bottomright, topright, topleft, bottomleft var logo = L.control({position: 'topleft'}); logo.onAdd = function(map){ var div = L.DomUtil.create('div', 'myclass'); div.innerHTML= "<img src='logo.png'/>"; return div; } logo.addTo(map);


1

Create a second style with bigger scale: style2 = [ new ol.style.Style({ image: new ol.style.Icon(({ scale: .9, opacity: 1, rotateWithView: false, anchor: [0.5, 1], anchorXUnits: 'fraction', anchorYUnits: 'fraction', src: '//cdn.rawgit.com/jonataswalker/map-utils/' + 'master/images/marker.png' })), zIndex: 5 }) ] ...


1

You can simply create a CQL filter that combines the elements that you need to select, so: CQL_FILTER=phase=1 AND grade='A' OpenLayers should take care of URL encoding it for you.


1

The route method does not pass any options on to the router. You'll want to use the getRouter method to set the router options first. Then you can recalculate using route: L.easyButton('<img src="pic.png">', function(btn,map){ myRouter.getRouter().options.costing = "pedestrian"; myRouter.route(); }).addTo(map);



Only top voted, non community-wiki answers of a minimum length are eligible