Hot answers tagged

7

In eclipsewise.com, the pop-up window's id is mapmaker. So, you can use the same JavaScript code in the same way. The script copies the pop-op content to the clipboard. function copyToClipboard(text) { var dummy = document.createElement("textarea"); document.body.appendChild(dummy); dummy.value = text; dummy.select(); ...


4

This is a new answer with the new websites. Procedure : Go on the desired eclipse site on http://xjubier.free.fr, for example View the source of the webpage (right-click on the eclipse marker data box) In the HTML source of the page, search for the block (few line below the top) : [...] <script type="text/javascript"> //<![CDATA[ ...


3

It seems like some kind of a bug. I didn't go into details why this happens, just found a workaround with modifying style. Instead of stroke weight 0, it gets weight 1. Since polygons overlap, this gives undesired effect at borders if opacity is 0.5. So opacity is set to one, but the whole GeoJSON layer opacity is set to 0.5 with the help of separate map ...


3

You will find a working sample code below to directly get the data from the URL and push it to a PostGIS table (I've considered you already have an existing database and ran CREATE EXTENSION postgis; ogr2ogr \ -f "PostgreSQL" PG:"host=localhost dbname=yourdbname user=yourusername password=yourpassword" \ -lco OVERWRITE=yes ...


1

Leaflet and React, assuming nothing terrible happened, are pretty fast. I'd use the simulated 3G/mobile testing tools in Chrome or Firefox's dev tools to see if I could figure out where the bottleneck is. One general tip for apps like this is to make sure you've optimized the GeoJSON within an inch of its life. Use mapshaper.org to squeeze it down. You won'...


1

Following — for simplicity I'm opting to always have a "FeatureCollection" evenif there is only one element.


1

I don't have enough reputation to reply to comments, but apparently enough to add an answer. Go figure. For the links that @null_radix provided, here are the corresponding npm links that should still be valid: https://www.npmjs.com/package/geojson-validation https://www.npmjs.com/package/@mapbox/geojsonhint The geojsonhint has been deprecated, but, as of ...


1

I got this error when I tried to use -s_srs without also using -t_srs: ERROR 5: if -s_srs is specified, -t_srs and/or -spat_srs must also be specified. I was able to save a geojson file by using this: ogr2ogr -f "GeoJSON" test.geojson "https://data.ny.gov/resource/9a8c-vfzj.geojson?$limit=100000&$where=county%20in(%27Kings%27,%27Queens%27,%...


1

Leaflet controls ordering of layers with so called map panes, which are DOM elements, each having it's own zIndex. There are several default map panes where different layers go by default (see https://leafletjs.com/reference-1.7.1.html#map-pane). All markers go to markerPane which has zIndex value of 600. Since all markers go to one pane, marker add later ...


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