Tag Info

Hot answers tagged

7

If you have to work with a Google base map, OpenLayers 2 will satisfy your needs. As stated in an OpenLayers 3 issue by @ahocevar, There will be no ol.source.GoogleMaps, unless Google change their policy and allow direct access to their map tiles. Your only chance to use Google wiht OpenLayers 3 is to make a base map without any controls with Google ...


5

That is a very hard question to answer. OpenLayers 2 has been very successful and it is easy to find examples for just about everything. OpenLayers 3 is a total rewrite and uses the Google Closure toolkit which provides a number of useful services: code compression, event handling, cross browser support, etc. OpenLayers 3 also uses webGL rendering, when it ...


4

In order to install the MapServer in Ubuntu 14.04 after you have installed Apache2, it is good to install php5: sudo apt-get install php5 After that you can install the available in the repositories version of the MapServer by executing: sudo apt-get install cgi-mapserver mapserver-bin php5-mapscript However, the available version in the Ubuntu ...


4

Step-by-step for GeoServer. Note: As @michal-mackiewicz writes, the WPS extension for GeoServer must be installed. Acquire some point data, for example Natural Earth populated places http://www.naturalearthdata.com/http//www.naturalearthdata.com/download/10m/cultural/ne_10m_populated_places.zip Import data into Postgis for example with ogr2ogr ogr2ogr ...


4

EDIT: Update, having belatedly realized this is a Map Server question. In general, to get the convex hull, you will want to group by id/gid, as producing the hull(s) is an aggregate operation. So, without the Mapserver part, the query would look like: SELECT id, ST_ConvexHull(ST_Collect(the_geom)) as the_geom from xyz group by id; Now, to get MapServer ...


4

For example: let's say you have a 10 megabyte raster/vector file that covers a large area. If you include the file directly into OpenLayers, it will download the entire file to the browser and render whatever part of it the map needs even if it's a small area. What mapserver will do for you is always deliver to the browser a small image of exactly what ...


4

There are two mode in MapServer in fact and it can be confusing for end users without knowledge about the project history. The first one, the now mostly outdated mode cgi (the url contains mode=browse) way where you don't rely on standards OGC webservices. It was supported in OpenLayers 2 by default because of history (more Mapserver instances not using ...


4

According to a recent comparison of different mapping engines in performing tile seeding (see Section 4.3), MapServer should be much faster than GeoServer. Is there any re-projection of geometries in your rendering stack? An old version of MapServer might have the same issue with proj4 lib as Mapnik had.


3

Kaarel´s answer should be marked as the correct answer. You need to call the loadFeatures function from the AJAX call. I created three jsfiddle to demonstrate ol 3.5.0 calls via AJAX for ol.format.GeoJSON (JSON and JSONP) as well as ol.format.WFS. WFS http://jsfiddle.net/goldrydigital/9d3jzpna/ JSON http://jsfiddle.net/goldrydigital/ucspgvx0/ JSONP ...


3

The loader should be defined with the callback function that is called when the response has been completely loaded. One way of doing this: loader: function(extent, resolution, projection) { var url = ...


3

How about using GDAL_Grid? Just pass the arguments over to GDAL and return the raster file or render it in the web browser. It does IDW, Nearest neighbor, and averaging and has a robust set of input parameters.


2

Thinking that you need heat maps rendered on the fly, I would go for these options instead: Leaflet: http://www.patrick-wied.at/static/heatmapjs/example-heatmap-leaflet.html OpenLayers: http://www.websitedev.de/temp/openlayers-heatmap-layer.html Both LL and OL: http://www.patrick-wied.at/static/heatmapjs/examples.html Some on-the-fly examples: ...


2

With MapServer the pixel value of a raster layer that should be interpreted as "nodata" and which should therefore be transparent is defined in the LAYER section of mapfile with the OFFSITE parameter. This is explained in MapServer documention at http://mapserver.org/mapfile/layer.html?highlight=offsite%20raster.


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.


2

I just ran into this issue and found that the problem was because I had not installed the ‘proj-epsg’ package. yum install proj-epsg


2

Just see this official demo example http://openlayers.org/en/v3.0.0/examples/wms-image.html Some others WMS samples are available. You will just need to change ServerType to mapserver (link for reference) Edit for completing with solution Without proj4js, you can always use the recipe from this other official example Declare an object ol.proj.Projection ...


2

With the fixed mapfile, it become clear to me, this is a client side problem. There is nothing wrong with the MapServer setup, the resolution limit has been set in the OpenLayers map object automatically. To override this limit, include a maxResolution parameter in your OpenLayers.Map constructor. var map = new OpenLayers.Map('map', { ...


2

It is not possible with version 5.6.8 but if you update to version 6.4 you can use the SIA shape smoothing algorithm. The RFC of the feature is in http://mapserver.org/development/rfc/ms-rfc-94.html and current documentation about the usage in http://mapserver.org/output/shape_smoothing.html#shape-smoothing. If you must to stay with the old 5.6.8 the only ...


2

I'd start with GeoServer on the server side. You just need to put the files on the hard drive, create an ImageMosaic store, then publish whatever layers (perhaps just one) you need. The ImageMosaic is the critical part - that will turn your collection of aerial photographs into a single image. Note that there are likely to be some artifacts where the images ...


2

We work regularly with tiled layers in our applications and I usually store tiles directly on a dedicated disk which I host as a virtual directory. You can see the tile directory here: http://argeomatica2012.cloudapp.net/SOLIDARIDAD_ortho/ I then add the tiles directly as a XYZ layer to my OpenLayers map like so: layerXYZ = new OpenLayers.Layer.XYZ("XYZ ...


2

The plugin is still alive, now named RT mapserver exporter: https://plugins.qgis.org/plugins/rt_mapserver_exporter/ To get it, you need to allow for experimental plugins, and you need the python-mapscript package on Linux (part of the ubuntugis mapserver package), or the mapscript-python package from OSGEO4W on Windows. If you run into troubles, see QGis ...


2

Looks like there's no current indent implementation for map files so you'll most likely have to write your own. However, if you're not already aware mapserver.org provides both syntax coloring and folding vim plugins. The files were written a while ago, so you may need to tweak it or find a newer one. To install: mkdir ~/.vim/syntax/ cd ~/.vim/syntax ...


1

It will never work. You are using code for the deprecated Google Maps API v2. Trying what's happened with the sample, I get a message like below Control is no longer supported in the Google Maps Javascript API v2. Please visit developers.google.com/maps/documentation/javascript/v2/v2tov3 to migrate your application to v3. I didn't dive into the ...


1

The output you are seeing is a result of the DEBUG (scroll down a little) statement in the mapfile. Specifically, msLoadMap not incl. means that the time displayed on the same line after the colon is the time taken to process the request (i.e.: the time spent reading data from shapefiles, or databases, assembling symbology, rendering and then output), less ...


1

I found the solution, it basically was to change this: -DCMAKE_LEGACY_CYGWIN_WIN32=1 to -DCMAKE_LEGACY_CYGWIN_WIN32=0 so, I used: cmake .. -DWITH_OGR=0 -DWITH_GDAL=0 -DWITH_WCS=0 -DWITH_WFS=0 -DCMAKE_LEGACY_CYGWIN_WIN32=0 and Mapserver compiled flawlessly.


1

If security is not an issue but you only want to load data within the current viewport. You can also look at OpenLayers BBOX strategy.


1

To investigate an error in a script file with psql, it may help to identify the first error by stopping the script on the first error with: \set ON_ERROR_STOP on This is off by default, which is why you might see repeated noise messages "ERROR: current transaction is aborted, commands ignored until end of transaction block" With an error like: ...


1

Expressions in MapServer are rather messy from users point of view even the documentation at http://www.mapserver.org/mapfile/expressions.html may feel fine for MapServer developers. What user must know is that datatypes matter and syntax is different for numbers and strings. For strings both the attribute name and its value must be quoted EXPRESSION ...


1

From a clean Ubuntu 12.04 Precise install I was able to get it to work with this: echo 'deb http://ppa.launchpad.net/ubuntugis/ppa/ubuntu precise main' | sudo tee -a /etc/apt/sources.list echo 'deb-src http://ppa.launchpad.net/ubuntugis/ppa/ubuntu precise main' | sudo tee -a /etc/apt/sources.list sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys ...


1

I think this sample should put you on the right track. https://developers.arcgis.com/javascript/jssamples/widget_print_esri_request.html It shows you how to print the map at various scales and it uses the PrintTemplate "format" option. In the sample, they are using PDF but you have other options (pdf | png32 | png8 | jpg | gif | eps | svg | svgz). See the ...



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