Tag Info

Hot answers tagged

3

I use Leaflet with SVGs as the maps. I do this because I want the map functionality on top of a floor plan. In my experience, it works much better than Raphael.js (maybe just because it's newer?), which my company used for the same purpose on a previous project. I have also made map tiles out of floor plans, but the SVGs are faster and smoother when zooming ...


3

Look at the samples on the specification site. You'll need to write a script in the language of your choice that will get you from [ {"date":"2014-09-25","time":"20:49:09","lat":"53.269","lon":"6.935","depth":"3.0","place":"Meedhuizen","mag":"1.5","type":"GH","last":"True"}, ...


3

Look at Are there any online WKT editors? GeoJSON and WKT OpenLayers vector formats GeoJSON geojson.io GeoJSONLint GeoJSON viewer and others WKT Wicket


3

In your code, myLines is not a geojson structure ... Try with this syntax { "type": "FeatureCollection", "features": [ { "type": "Feature", "properties": {}, "geometry": { "type": "LineString", "coordinates": [[42.438917, -71.116146],[42.443904, -71.122044]] } }, { "type": "Feature", ...


2

After looking in the API docs at http://openlayers.org/en/v3.0.0/apidoc/ol.source.GeoJSON.html and unchecking the checkbox Stable Only on the top right of the banner, I see a projection option for the source. It's here you have to set the projection to say to OpenLayers 3 to transform the data coordinates. Trying changing your fiddle with below part, it ...


2

Turns out it is as easy as this: MIMETYPE "application/json; subtype=geojson; charset=utf-8" Without the setting, no content encoding is returned by the server.


1

The GeoJson you link to is valid See by yourself http://jsfiddle.net/FranceImage/pcqsne4z/ L.geoJson(getData(), { onEachFeature: handleFeature } ).addTo(map); function getData() { return { "type": "FeatureCollection", ... ... "geometry": { "type": "LineString", "coordinates": [ [-1.0950612, ...


1

Try parsing the JSON like this: var json = { "st_asgeojson": { "type":"LineString", "coordinates":[ [23.4582348,37.5062675], [23.4577141,37.5066109], [23.4572601,37.5070038], [23.4566746,37.507301], [23.455698,37.5076256], [23.4549737,37.5079214], ...


1

You prepare an empty table with an id <table id="properties"></table> And you populate it with innerHTML property for (var prop in properties) { if (properties.hasOwnProperty(prop)) { document.getElementById("properties").innerHTML = document.getElementById("properties").innerHTML + "<tr><td>" + prop + ...


1

You could do this using Javascript Topology Suite which will work with Node.js. Start with an empty MultiPolygon (or the first geometry in your collection) and union this with each (Multi)Polygon in your collection. You can only have one format for the whole collection, obviously, as properties are one to one with the geometry in the GeoJSON. Here are some ...


1

Geojsonlint seems to suppose that GeoJSON is in WGS84 coordinate system which is also the only officially supported CRS in the newest GeoJSON specification (draft) https://tools.ietf.org/html/draft-butler-geojson-04 I converted your GeoJSON into epsg:4326 with ogr2ogr by using command ogr2ogr -f geojson -s_srs epsg:3857 -t_srs epsg:4326 geojsontest2.json ...


1

You could use a spatial database (like PostGIS). First, you put all your addresses in a table "addresses" with a column "Point" of type Point and a column "Address". CREATE TABLE addresses (Point Point, Address Varchar(50)); Then you put your polygon in another table, let's call it "poly". It can have a column "Polygon" of type Polygon and another column ...


1

I got it : I just deleted onPopupClose from popup definition in function monpopup(event). Now white cross does its job


1

Unfortunately this is a custom JSON format (and not GeoJSON), so I don't see any other option than reformat these data, which requires some coding: You can reformat it to conform GeoJSON (or any other format which is readable by OGR) and use v.in.ogr. Or you can reformat it to GRASS ASCII format and import the point data with v.in.ascii, see example 3.


1

Reproject from Web Mercator, for example to WGS84 ogr2ogr -f GeoJson 050_00wgs84.gjson 050_00.shp -s_srs EPSG:3857 -t_srs EPSG:4326 topojson --id-property=GEO_ID -o 050_00wgs84.json -- 050_00wgs84.gjson Then: var width = 800, height = 800; var svg = d3.select("body").append("svg") .attr("width", width) .attr("height", height); ...



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