Tag Info

Hot answers tagged

3

POLYGON((-90.89 46.67,-90.89 46.67,-90.89 46.67,-90.89 46.67,-90.89 46.67)) Looks like WKT. If it is, you can convert features/layers/geojson to WKT using Wellknown or Wicket-Leaflet


2

If you mean to disable panning, here's how: First declare your map variable: // Create a map in the div #map var map = L.mapbox.map('map', 'example', { minZoom: 2,//need to change it to 1 maybe 0 for mobile devices // These options apply to the tile layer in the map. tileLayer: { // This map option disables world wrapping. by default, ...


2

function getStyle(feature, resolution){ var style; if (feature.get('field_6') === '4') style = new ol.style.Style({ image: new ol.style.Circle({ radius: 6, fill: new ol.style.Fill({ color: 'rgba(20,150,200,0.6)' }), stroke: new ol.style.Stroke({ ...


2

You can do this using a style function (see also the OL3 Example on Earthquake Clusters for a more detailed example of a style function - or search this site!). In your case, partial code would be along the lines of: var myStyleFunction = function(feature, resolution){ var field_1 = feature.get('field_1'); if (field_1 == "PENYEDIA AKOMODASI"){ ...


2

The 4.0 beta 1 does not support KML. The KMLLayer will be supported in a future beta version. Beta 1 only supports the modules documented in the API Reference.


1

Yes, you can! Actually I built something similar in this example some weeks ago (the basemap switcher doesn't look great, but the functionality is there): http://bl.ocks.org/iriberri/08abc420a376053c71d4 You can just save the basemap layer into a variable and change its _url parameter. Then, just redraw it: ...


1

You can accomplish this using the following: L.mapbox.tileLayer('https://{s}.tiles.mapbox.com/v4/YOUR_MAP_ID/{z}/{x}/{y}.png?access_token=YOUR_ACCESS_TOKEN') All you have to do is replace YOUR_MAP_ID and YOUR_ACCESS_TOKEN in the above snippet.


1

Try out this tutorial, someone got stuck with a similar problem and wrote some code to get around it http://spatialnotes.blogspot.com/2010/11/capturing-right-click-events-in.html


1

This way: var deleteFeature = function(evt){ if(evt.keyCode == 46){ //delete key pressed //delete feature } }; document.addEventListener('keydown', deleteFeature, false);



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