Tag Info

Hot answers tagged

9

In addition to the above excellent answers, let me add my own experience. A year and a half ago I decided I wanted to use OpenLayers (OL) in my Master's project and set out to learn it. I have been doing programming and digital map making as part of my work as an archaeologist since the early 1980s, and have been an ArcGIS user for 15 years. I am happy I ...


9

It isn't necessary to learn OpenLayers or Leaflet when you just want to use GeoServer. However, I have a single advice for you: because you already have a working GeoServer, do yourself a favor and go to https://github.com/boundlessgeo/suite/tree/master/geoexplorer. Follow those instructions, build a geoexplorer.war and deploy it to your servlet container. ...


7

Keep in mind that WFS is already a service which returns its data format (mixture of OGC standards). GeoJSON and KML are only a data format, you'll have to build the service to return the data. So included with WFS are already advanced filtering capabilities such as temporal filters, spatial filters (intersect, touches, overlaps...) as well as logical and ...


7

Short Answer: No, not directly Long Answer You need to understand that these are two different technologies. a ArcMap Document (.mxd) is a file which tells ArcMap which layers to use and how to render them etc. OpenLayers is a JavaScript Library that is used for creating application which consume Web Services. A .mxd file can only be opened in ArcMap, ...


7

div.olControlScaleLine{ color: white; } div.olControlScaleLine>div{ border-color: white; }


7

Why use a database? Because it's not necessarily the case, especially with larger datasets, that you can expect to be able to push the entire thing to the client. If you're talking thousands of points, then sure, but for millions of points you probably don't want each and every one represented in RAM on your end users' client. Not everyone has a super fast ...


6

What you have found is something in the OpenLayers sand box, which is an environment where OpenLayers contributors can add their own custom layers, controls, etc. Sometimes things created in the sand box work their way through to the core distribution. However, it is simple to take what has been created and add it to your OpenLayers build. First, you need ...


6

I've always successfully used Custom Builds Profiles to create custom OpenLayers Deployments. There is a detailed explanation available here: Custom build Profiles These are the steps I follow: Go through my Code and see which classes I'm using. Basically look for any class which you are using like new OpenLayers.ClassName(). Add these classes to the ...


5

Look at the Boundless OpenLayers workshop. It covers a lot of material. The workshop is using GeoServer instead of MapServer, but you can simply change the URL of the example to your MapServer WMS service.


5

While the others have suggested good online tutorials, let me tell you about the book that gave me a much needed strong foundation in OpenLayers. The book is: Erik Hazzard's OpenLayers 2.10 Beginner's Guide. It is available from Packt Publishers. I would strongly recommend the book, because it deals with all major parts of the Library. It starts from ...


5

QGIS don't use directly the layers of Bing Maps or Google Maps or Apple (forbidden, licensing issue) but use OpenLayers via Python (with the OpenLayer Plugin). This plugin allows you to add a number of image services (allowed) to your map canvas. You can use them for your work, but if you want to publish the map, you will be bound by the terms of the ...


5

Your generated GeoJSON is valid JSON, no problem. But, it's not valid GeoJson, as you can see here: http://geojsonlint.com/ The problem seems to be that the features-array in your featurecollection contains three features, two with geometry:none and one with just geometry (which is also string-encoded). So, in short: Your OpenLayers-code seems fine, the ...


4

Change the order of your js-files. Load OpenLayers before the files within js-folder. <script src="ol-211/OpenLayers.js"></script> <script src="ol-211/firebug.js"></script> <script type="text/javascript" src="js/geocoding.js"></script> <script type="text/javascript" src="js/map1.js"></script> <script ...


4

There's an Open Source project especially to read and write LiDAR (and any other source of pointcloud data) format. This library, called PDAL is located at http://www.pointcloud.org/ I've seen demo using OpenLayers reading data from a PDAL source, but can't locate it anymore. Your best bet would be to ask on the mailing-list over there. Edit Boundless ...


4

A solution could be to initialize OL without controls. var map = new OpenLayers.Map({ controls: [], div: "map_canvas" }); And now you can add your controls with map.addControl(new OpenLayers.Control.PanZoomBar()); Or define controls on initialisation var map = new OpenLayers.Map({ controls: [new OpenLayers.Control.PanZoomBar()], div: ...


4

Here is a complete answer how to show loading mask while doing WMSGetFeatureInfo : Create the loading mask (I've been using ExtJS) var mask = new Ext.LoadMask(Ext.getBody(), {msg:"Retrieving Info"}); Declare The WMSGetFeatureInfo event listener and make it HIDE the mask: infoControl = new OpenLayers.Control.WMSGetFeatureInfo({ url: "xxxxxxx", ...


4

OpenLayers directly read OpenStreetMap vector files (.osm format) and Leaflet can read it with plugin. Osm file contains all the points of the road in order.


4

Is it possible to make the local coordinate system the default for the whole map in one of those map libraries? You surely can. But then the base layer must be in this CRS too, meaning that you wont be able to use OSM from a public source. If not, should the data be converted into the coordinate system of the map (WGS 84) in the database or a ...


4

First of all, I recommend you to read the spec. The biggest pro of WFS is that it is official and standardized way to access vector data. That means when you use WFS, you do not have to reinvent to wheel (e.g. what should happen when two people edit the same feature at the same time?). It is also much easier to share data over WFS than using GeoJSON or KML ...


4

This is an interesting question, and I wanted to investigate the issue. Firstly, with some brief experimentation, I saw that Geoserver does not return any data from the non-rendered region when you use the GetFeatureInfo request on the WMS service. To see if this is expected behavior, I checked the documentation for the GetFeatureInfo request. You can ...


4

You are facing this issue, because you are using the OpenLayers Library that comes with Geoserver. This Library is an 'lite' version of the OpenLayers Library, and should not be used for Custom Applications. It has only those classes which are required by Geoserver's preview function. It does not have the additional classes like those required for the ...


4

You're reading too much into the "security concerns" comment. Basically he means you can't connect directly to the database, which is more true from a practicality point of view than from a security point of view. You're going to have something speaking HTTP between your web page and your database. It could be MapServer or GeoServer or FeatureServer. Or it ...


4

The following piece of code allows you to transform your latitude and longitude coordinates from epsg:3857 to epsg:4326 in just one line. Just substitute longitude and latitudine values to LON and LAT in the code. point = new OpenLayers.LonLat(LON,LAT).transform('EPSG:4326', 'EPSG:3857'); In point you'll have an OpenLayers readable point.


4

This is a comparison between multiple tiles and single tile using WMS in OpenLayers: var map = new OpenLayers.Map({ div: "mapDiv", layers: [ new OpenLayers.Layer.WMS( "Single Tile", "http://vmap0.tiles.osgeo.org/wms/vmap0", {layers: "basic"}, {singleTile: true, ratio: 1} ), ...


4

Yes it is possible to do this, and it's a great way to share browsable maps via DVD or USB stick offline. The major drawback is of course each client needs a complete set of tile data (probably running into a few thousand files and several gigabytes depending on the zoom level/area of the map). You need to render the tiles (or copy them off an existing ...


4

In short: openlayer run something like a web browser in the background with the images, and force the position in the web browser to match the one in the gis software (sometimes it doesnt do pretty well). Thats why you can use bing or google images in QGIS.


4

Since your search region is circular, it is perhaps best not to consider it to be a polygon, but as a point with a radius and to use the ST_DWithin() function: ST_DWithin — Returns true if the geometries are within the specified distance of one another. It should save you and the processor a lot of effort.


4

Aha, I was confused for a while, but now I'm not. Generally, I would expect a buffer in UTM to match up pretty well to a geodetic buffer. Close enough you wouldn't be able to see the difference. But, looking at your map, it looks like you're working in a European city, but you're generating your PostGIS buffer in UTM 18, which is valid in the area of New ...


4

This is a known issue of OpenLayers, there is a known workaround is to add: renderers: ['Canvas', 'VML'] to your vector layer configuration. I have tested it with firebug in your page. With that line added, it works all right. The reason is that the default SVG renderer has a limited coordinates range. For more details please checkout the issue page: ...


4

You can set on the start of openlayers script with: function init(){ var option = { projection: new OpenLayers.Projection("EPSG:3857"), displayProjection: new OpenLayers.Projection("EPSG:4326") }; or in the layer with trasformation extent = new ...



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