Tag Info

New answers tagged

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 + ...


0

Personnally, I need more input. I maybe misunderstand but it seems to works: I mean I see your geoJSON properties within the data and attributes keys with the values in the debugger complete. I use below code in Firebug at http://dev.openlayers.org/releases/OpenLayers-2.12/examples/draw-feature.html var featuresText = ...


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 ...


0

There is a good answer in Google Groups by Nelson Minar: Use experimental plugin by Ziggy Jonsson and Nelson Minar that renders GeoJSON with D3: https://github.com/NelsonMinar/vector-river-map/blob/master/clients/lib/TileLayer.d3_geoJSON.js Nicklas Aven recommends TKWB binary format that is 80% more effective bandwidth-wise. There is another D3+Leaflet ...


0

I would suggest Grass GIS. The v.net package is a pretty powerful tool. Grass can be a bit tricky to get going on but with a tutorial or two you should be OK. You will also need to interpret the matrix result that will be ~200 by ~200 with the distances. Export to excel, import with Python, etc. and do what needs doing with it. ...


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", ...


0

Have you tried to explicitly reproject your data using ol.proj.transform? For example: var map_centre = ol.proj.transform([lon, lat], 'EPSG:4326', 'EPSG:3857');


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


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 ...


0

create your overlay offline(but dynamically) using the programming language of your choosing. it'll be a bit complex but the basic pseudo code would be: browser javascript send request url for overlay acquire gis bounds for tile server side gather all points and sort by their relevance create image(transparent) for each point: (least relevant first) draw ...


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.


0

Check out the stringDivider method in the source code for this example: http://openlayers.org/en/v3.0.0/examples/vector-labels.html


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); ...


0

Although I can't see any specific documentation, it appears that once a column type is set in CartoDB subsequent refreshes to the same table do not unset the column type. So even though we're still getting "string" columns from Fulcrum, those columns are updated in CartoDB without changing the column types assigned in CartoDB.


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


0

It's actually a bug in GeoServer. GeoServer in it's WFS implementation specifies the order of coordinates for different versions and projection definitions (link) but GeoJSON states specifically that the order is always the same (x,y,z or lon,lat,alt). See the spec.


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

Check out compositing operations, possibly dst-in. Your carto might look something like this: #neighborhoods { line-color: #ccc; polygon-opacity: 1; polygon-comp-op: dst-in; }



Top 50 recent answers are included