Tag Info

Hot answers tagged

2

You can't use the OL2 way variable substitution, using the ${} notation. In OL3 there is the "style function" concept you can pass to the layer style property. It is executed for each feature and receives as argument the feature to be rendered and the resolution at which it is rendered. With all this you can get feature properties and use to return an ...


2

When you define your vector source, put the projection setting pointing to the target coordinate reference system (see the docs): new ol.layer.Vector({ title: 'added Layer', source: new ol.source.GeoJSON({ projection : 'EPSG:3857', url: 'mygeojson.json' }) }) Look at this example (using your sample data): ...


2

I have put a projection setting in your source definition and it seems to work: var vS=new ol.source.GeoJSON( ({ "object": data, projection: 'EPSG:3857' }) ); This is the result: http://jsfiddle.net/zzahmbff/3/ Perhaps this resource can help you to see different ways to load vector data: ...


2

There are couple of things which you might not know, which is causing all this issue. Firstly the GeoJSON is supposed to have coordinates in longitude, latitude order. This can be seen in the specifications, which says: The order of elements must follow x, y, z order (easting, northing, altitude for coordinates in a projected coordinate reference ...


1

Yup, it's a bug. You can simplify it with: SELECT ST_AsText( ST_GeomFromGeoJSON('{"type":"LineString","coordinates":[[0,0],[1,1],[1,1],[2,2]]}')); st_astext ------------------------- LINESTRING(0 0,1 1,2 2) Which should be LINESTRING(0 0,1 1,1 1,2 2). You should file a ticket to get it fixed. If you don't have a user ID, follow these ...


1

Unless you used an 8.0 build of ArcGIS Desktop, the shapefile is probably properly constructed, which means that the root problem may be with the target database not properly handling an inversion. In figure 1, the shape is represented two rings: Ring1: A, B, C, D, E, F, A Ring2: G, H, I, C, G When ArcGIS inserts the original shape through the ArcSDE ...


1

Currently only GeoJSON to Esri JSON has been developed. Also, note that only geometries in the WGS84 coordinate system are supported see sources: http://esri.github.io/geojson-utils/examples/test.html https://github.com/Esri/geojson-utils Including https://github.com/Esri/Terraformer


1

I double checked the geoJSON file' geometry, strangely it's in multipoint rather than single point. The geoJSON file is exported with QGIS from a shapefile that only has point geometry features. I would expect the new geoJSON is in single point geometry rather than multipoint.


1

As far as I know, QGIS doesn't support editing GeoJSON or TopoJSON files (I'm not sure you can even load the latter), but your ShapeFiles should be certainly editable. Try again with the Shapefiles, if that works consider converting your GeoJSON and TopoJSON files to Shapefile or, even better, to a database format like SpatiaLite or PostgreSQL/PostGIS.


1

This is tricky. Really tricky. First off: your description is lacking in many ways, what do you mean by "Some PDF maps contain lat/lng."? Is the map annotated with lat/longs in a grid? If so, you could try georeferencing (see georeferencer plugin) the map using qgis and then digitizing the features in qgis, and then saving the digitized features as GeoJSON. ...


1

In the javascript code the array is treated as a string so try to parse this sting as json before using , then assign the result to coordinates . So if your result in success function is result , parse its coordinates attribute before using it this is example how to do so : result = { "type": "FeatureCollection", "features": [ { ...



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