leaflet

Leaflet JS + Leaflet.Deflate - Changing default marker icon to custom icon

时间秒杀一切 提交于 2019-12-25 08:36:21
问题 In my previous post 'Leaflet JS - changing esri shape into marker on certain zoom level ' I was able to resolve an issue which i had with the leaflet JS library and changing the polygon shapes to markers icons when hitting a certain zoom level. I was advised by 'Ivan Sanchez' to use the 'Leaflet.Deflate' plugin and this works like a charm, so now the various shapes are being transformed into markers after a certain zoomlevel, however now I'm struggling to change the default leaflet marker

How to draw polyline perpendicular to another polyline using Leaflet

你。 提交于 2019-12-25 08:22:36
问题 I've drawn a polygon and I want to draw a perpendicular line to this polygon. I found the computeOffset function of google maps api from here, but I'm using Leaflet. Is there an equivalent function in Leaflet? Here is a screenshot of drawing the polyline. I want to draw the perpendicular line that passes through the start point of the drawing polyline (the start point is marked with a marker on the screenshot). The expected result is like this. Thank you. 回答1: No, Leaflet has no equivalent.

I'm having problems showing leaflet map in a bootstrap tab

£可爱£侵袭症+ 提交于 2019-12-25 08:21:32
问题 I'm trying to put a leaflet map on a bootstrap tab, but it's not working. Not showing at all or missing tiles and in the wrong position . Does anyone have an idea how to fix that? This is an example of the problem: missing tiles This is my code: https://gist.github.com/h3kr/991ac0ee5a88d0cecba27e91c886675e 回答1: You forgot to include the CSS file for Leaflet. Let me quote the Leaflet docs: The latest stable Leaflet release is hosted on a CDN — to start using it straight away, place this in the

Mapbox.js returns tiles in wrong order

﹥>﹥吖頭↗ 提交于 2019-12-25 08:14:13
问题 When using Mapbox-gl.js in the latest chrome browser, everything works fine. When I want to use the default mapbox.js implementation, the map tiles are getting al mixed up and shown totally wrong. See screenshot I have totally no idea why this does not work with mapbox.js, while I did not experience any problem with mapbox-gl.js 回答1: Make sure you're loading the CSS files for the mapbox.js library. Tiles being arranged that way are usually a symptom of missing CSS rules. 来源: https:/

display of mapview object in shiny

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-25 07:19:11
问题 I’m trying to have two spatial plots side-by-side in shiny, and I was suggested a powerful function, sync of mapview . sync allows to have multiple maps for comparison, a great feature, but unable to figure out integrating or calling its output in shiny. I have gone through ‘mapview for shiny’ and other related links mapview/shiny. The former suggested using renderMapview and mapviewOutput , however it did not work, i.e., no map being displayed. Please see the reproducible code. Also, I tried

Leaflet JS (react-leaflet) - Bounds Box Filled With Transparent Color

筅森魡賤 提交于 2019-12-25 07:15:05
问题 I'm working with react-leaflet package, however, if you can answer the question in plain leaflet that would be helpful as well. I am successfully panning to the bounds of a polygon that I supply like so: <Map center={position} zoom={13} bounds={this.state.bounds} className="campaignimagery-map"> <TileLayer url="http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png" attribution="" /> However, I would like the entire polygon boundary box to be some transparent color so they can see exactly where

Selecting leaflet markers

强颜欢笑 提交于 2019-12-25 07:14:20
问题 I have data coming from a Json file and I created a layer based on this Json file using markerClusterGroup. I am hitting the wall trying to do this: 1 - Select some markers based on some Json's feature ("temperatura", "salinidade","corrente", "profundidade" e "geofisico") in xbt.json and using a select list in the HTML: <select name="sometext" > <option value="temperatura">temperatura</option> <option value="salinidade">salinidade</option> <option value="corrente">corrente</option> <option

Leaflet JS - Country Boundaries

a 夏天 提交于 2019-12-25 05:33:26
问题 I am using Leaflet JS to create a map. Have to say I'm a huge fan, Works a lot smoother than Google and Bing too. Also like the customisation you can do with it. Brilliant! The only query / issue I have is the big lines it draws blue (or themed borders) around countries. See screenshot attached. I am wondering if there is a method to remove them? Thanks 回答1: This has nothing to do with leaflet. The lines are drawn by your tile provider. Change the source of the tiles to fit your needs.

Leaflet JS - Country Boundaries

大憨熊 提交于 2019-12-25 05:33:05
问题 I am using Leaflet JS to create a map. Have to say I'm a huge fan, Works a lot smoother than Google and Bing too. Also like the customisation you can do with it. Brilliant! The only query / issue I have is the big lines it draws blue (or themed borders) around countries. See screenshot attached. I am wondering if there is a method to remove them? Thanks 回答1: This has nothing to do with leaflet. The lines are drawn by your tile provider. Change the source of the tiles to fit your needs.

Can't remove layer associated to each checkbox using leaflet

*爱你&永不变心* 提交于 2019-12-25 04:58:33
问题 I have an issue and I'm trying to solve it sine two days, so I have a list of data retrieving from postgres database, each item of this list is associate to a checkbox, so when I click a given checkbox the corresponding layer will display on map using of course Leaflet. My purpose is to create this layers dynamically to be enable to delete each layer when I uncheck its given checkbox. When I click each checkbox I can retrieve coordinates of its associated element from database to displayed on