Skip to main content

Questions tagged [mapscript]

MapScript is an API for MapServer

Filter by
Sorted by
Tagged with
2 votes
0 answers
318 views

Setting up environment for python MapScript development

I'm trying to setup a virtual environment for developing against the Python bindings of MapScript on Windows. So far, I've tried several things in various combinations: Install MapScript via pip ...
mael's user avatar
  • 21
0 votes
2 answers
64 views

MapScript : Output creation date

Is it possible to make an output of the creations date in a map script file (WMS). I have a WMS service for example like this: MAP NAME "Basel-01" STATUS ON #EXTENT -137 29 -53 88 ...
hpthaeler's user avatar
1 vote
0 answers
94 views

Point style with Python MapScript does not work

Software details: CentOS 7, Python 3.6, MapServer v 7.2.1 is compiled from source. I use Python MapScript to build WMS, it works well for styling Lines and Polygons, but not for Points. For example,...
MapUser's user avatar
  • 111
2 votes
1 answer
233 views

Get values from shapeObj MapScript

I'm using Mapserver 7.4.0-dev and MapScript PHP. In previous versions of MapServer and MapScript (https://mapserver.org/mapscript/php/index-5.6.html#shapeobj), I could query a shapeObj after its ...
boomdrak's user avatar
  • 153
0 votes
1 answer
372 views

PHP MapScript - Query GDB Geodatabase?

I'm trying to use/learn some PHP MapScript on a GDB file and cannot get anything from it. The PHP below works great if I use countries.sqllite (via countries.map) file I have and shows me an array of ...
Andrew T's user avatar
  • 301
1 vote
0 answers
427 views

Tilecache and python (TMS)

I'm working on a Django tile solution to serve thousands of images. So far I have been able to set a Mapscript server with tilecache. Everything seems ok but when loading into Leaflet I got some kind ...
Jaime Valdez's user avatar
1 vote
0 answers
77 views

Using php_mapscript on WAMP? [closed]

I use WAMP in my Windows, and I want to use phpmapscript for programming. I've copied the phpmapscript.dll file to C: \ wamp64 \ bin \ php \ php5.6.25 \ ext and I added the "extension = php_mapscript....
ali's user avatar
  • 21
0 votes
1 answer
342 views

PHP MapScript installation error

I'm trying to install MapServer version 7.0.6. I also want php MapScript so I'm doing it by compiling from source. I've installed two versions of PHP (5.6 and 7) on my system (Linux Mint 18.1) but I'...
Stefanos's user avatar
  • 487
11 votes
0 answers
605 views

MapScript with Python 3

I am trying to build raster summarizing features into a GeoDjango webmap, and would like to use the django-raster and django-wms packages to do so. I believe that I have them set up correctly, but am ...
jbukoski's user avatar
  • 1,297
3 votes
1 answer
1k views

Python MapScript usage

I just started learning how to use Python MapScript for MapServer so I am trying very mininal example just to see how it works. My code is: #!/usr/bin/env python import mapscript mapfile = "/path/...
Stefanos's user avatar
  • 487
1 vote
0 answers
126 views

Mapscript_csharp issue with version 7.0.4

Processing a map file with use of mapscript_csharp.dll (version 7.0.1) and map contains a few WMS HTTP layers and some are local shapefiles. After upgrading from Mapserver 7.0.1 to latest version 7.0....
Erwin's user avatar
  • 11
1 vote
0 answers
439 views

Python MapServer MapScript & Mongo - Use GeoJSON String Vs File

I have been using Python MapScript bindings for MapServer - and they work great. A new datasource for the application I am working on is MongoDB. I have seen mentions of a MongoDB Driver for ...
user890's user avatar
  • 5,733
1 vote
1 answer
217 views

Using mapscript with ruby on rails? [closed]

I want to use mapscript with rubyonrails how should i start doing this? can anyone point to a good tutorial on mapscript?
dowi's user avatar
  • 519
0 votes
1 answer
269 views

Change a layer order with mapscript

I'm very new with mapScript, I'm looking to change a layer order with mapScript. My ms_newMapObj is a merge of many mapfile so I don't know the index of the layer I want to move up. I haven't find ...
Michael's user avatar
  • 173
0 votes
1 answer
439 views

Drawing specific layers of mapfile with MapScript?

Is it possible to call a draw on a mapFile with a list of layers to include with mapScript? I have a bunch of layers defined on my mapfile but I don't want to call all of them. I don't use "STATUS ...
Michael's user avatar
  • 173
0 votes
2 answers
1k views

How to compile or find PHP MapScript (MapServer) latest version for Windows?

I had major performance difficulties with MapServer version 6.0.3 (MS4W 3.0.6) and need latest version of MapScript but I can't find it for Windows. Anybody can help me to find latest compiled (...
MSS's user avatar
  • 262
2 votes
0 answers
287 views

python-mapscript on OSX Yosemite

I am keen to try out the mapserver export plugin from QGIS 2.6 This needs python-mapscript which comes from the mapserver package. This can be downloaded from http://www.kyngchaos.com/software/...
user1331131's user avatar
0 votes
1 answer
2k views

How do I get OpenLayers to set the default view in EPSG:27700

Disclaimer, I'm fairly new to OpenLayers, but I'm not new to JavaScript and/or Web Programming :-) Synopsis I have an open layers based html page, that I'm trying to use to render a WMS map served ...
shawty's user avatar
  • 1,731
1 vote
1 answer
427 views

Installing PHP MapScript for MS4W

I have the following version on my machine. But the MapScript is not installing. Can any one help?
Rishabh's user avatar
  • 33
1 vote
2 answers
2k views

How do I install PostgreSQL + PostGIS + MapServer + Python-MapScript on Ubuntu 12.04 LTS w/o compiling from source?

This question is similar to How to have PostGIS 2.1 and the Python osgeo library installed together without compiling from source? but I couldn't figure out how to ask a follow-up question. I am ...
svw's user avatar
  • 13
3 votes
1 answer
2k views

How to use PHP MapScript to generate a MapServer Mapfile

I just read from this question that the OP was using Mapscript and C# to generate and display a Mapfile I was wondering if it is really possible to use MapScript to generate a Mapfile? And if so, ...
tinlyx's user avatar
  • 11.2k
4 votes
2 answers
759 views

When to choose MapScript over a Map file or vice versa?

Are there things that can be done with MapScript and not Map file or vice versa? What are the scenarios to use each one?
dowi's user avatar
  • 519
0 votes
1 answer
3k views

Installing python-mapscript in virtualenv

I am on a django project where I want to use the python implementation of the mapserver mapscript library. I was able to install mapserver and python-mapscript from source. However, due to the ...
yellowcap's user avatar
  • 3,043
1 vote
1 answer
773 views

[mapserver]: layer filtering with layerObj.setFilter()

I'm trying to filter a layer (using mapserver) backed by a Shapefile using layerObj.setFilter() but this doesn't seem to have any effect on the returned tile(s). Sample code: layerObj = mapserver....
James Mills's user avatar
0 votes
1 answer
822 views

Setting DATA string on LayerObj in MapFile by Using Mapserver's PHP Mapscript

I'm manipulating mapfiles through mapscript. Setting layer attribute values like the opacity works like this: $layer = $map->getLayer('layername'); //set an attribute value $layer->set('...
jorrebor's user avatar
  • 221
1 vote
1 answer
1k views

How to set attribute value of layer with PHP MapScript?

How can I set attribute values of a layer object with MapScript? I'm using MapServer version 5.0.3, the php_mapscript.so lib is loaded in my app context I have a simple Mapfile: MAP SIZE 500 ...
jorrebor's user avatar
  • 221
1 vote
1 answer
441 views

Is that possible to use map object ( PHP_MapScript ) instead of map file when using the MapServer?

In my previous code, I am using OpenLayers WMS to load a raster data through MapServer. As you can see, the mapserv.exe calls a local map file to load the raster data. I just heard PHP_MapScript, ...
Yu Guo's user avatar
  • 639
0 votes
1 answer
48 views

Is there a way to tell the supported input formats of libmap.dll without the associated .exe?

I have only compiled Mapscript_csharp and supporting dlls used in a .NET application - not the executables. Is there a way to tell what input / output formats are supported by these dlls?
Dave Lowther's user avatar
1 vote
2 answers
1k views

PHP MapScript get feature / shape by index in layer

I upgraded my MapServer version from 5.6.x to 6.2.0 (yes, big version jump here!) and I am stuck with getting a shapeObj from a layer by simply using its Index (or FID for shapefiles or GID in case of ...
Francesco's user avatar
  • 182
3 votes
2 answers
198 views

How to develop a web mapping app to upload, process, and download results?

I would like to make a web mapping application where a user can import their own x-y-z data file, then the application applies filters that I write to it, contours the resulting data, then displays ...
MrX's user avatar
  • 123
0 votes
1 answer
974 views

Why is mapserver layer not showing up in openlayers?

I'm currently setting up a Mapserver/OpenLayers application. My mapscript works fine when i run on mapserver, but my mapserver layer not showing up in openlayers. this is my mapscript "tangsel.map" ...
Indra Bayu's user avatar
1 vote
0 answers
608 views

php_mapscript.so not present after Mapserver 6.2.0 compilation

I use this to compile mapserver cd /opt/ wget http://download.osgeo.org/mapserver/mapserver-6.2.0.tar.gz tar xvf mapserver-6.2.0.tar.gz cd mapserver-6.2.0 ./configure --with-ogr=/usr/local/bin/gdal-...
Niculita Mihai's user avatar
7 votes
1 answer
1k views

Filling a polygon with lines using Postgis

I need to calculate a specific distance in an area. The distance is calculated from parallel lines in a polygon, And I need to find out how many parallel lines (with x meters distance to each other) ...
bahadir's user avatar
  • 369
1 vote
1 answer
708 views

"Wrapper" script or "wrapper" web app for MapServer?

So I have been reading up on http://mapserver.org/cgi/wrapper.html and was wondering if there are any more substantial examples of creating a full-fledge web application (using Python and, if ...
Calvin Cheng's user avatar
1 vote
2 answers
714 views

Python Mapscript 6.0.1 layer.getShape API [closed]

I am attempting to follow the mapscript example described here - http://trac.osgeo.org/mapserver/wiki/RasterQuery but ran into some trouble with s = layer.getShape(result.shapeindex, result....
Calvin Cheng's user avatar
2 votes
1 answer
1k views

How does mapscript queryByShape work?

I am trying to return the results of queryByShape call from a (large) raster file given a user specified polygon. For example, when a user plots the following polygon on an openlayers layer as shown ...
Calvin Cheng's user avatar
3 votes
1 answer
3k views

C# & Mapscript - Setting Environment Variables At Runtime

I am working on an application that makes use of the c# Mapscript bindings. When I manually set and/or append to the GDAL_DATA, GDAL_DRIVER_PATH, PROJ_LIB, and PATH environment variables - the ...
user890's user avatar
  • 5,733
1 vote
0 answers
590 views

MapServer inside WordPress Pages/Posts?

I'd like to put maps inside of a wordpress CMS, but I'm running into troubles with the permalink structure ignoring the maps all together... I have a .htaccess file that will force WordPress to ...
Matthew Kettlewell 's user avatar
1 vote
1 answer
380 views

Mapscript - PostGis Error

I'm doing a spatial query, but I always get an error: "msPOSTGISLayerGetShape(): Query error. msPOSTGISLayerGetShape called on unopened layer (layerinfo = NULL)" This is my code: layerObj ...
Michel Andrade's user avatar
2 votes
2 answers
2k views

WFS - MapServer - ASP.NET

Nowadays i'm working with Mapcript / Mapserver. I would like to know how to used WFS (Web Feature Service) with ASP.NET. I think i need to use WCF, right? Is there any tutorial or framework?
Michel Andrade's user avatar
4 votes
1 answer
175 views

How to restore default values in Mapserver?

I'm using Mapscript reading a configuration of my map file, so i set some values in my mapObj. But in certain point of my code i need to restore the default values locate in map file. I tried to use ...
Michel Andrade's user avatar
3 votes
1 answer
750 views

Mapserver - Hide Labels

I'm creating a map with some layers, each one has a label, the problem is that, Mapserver is displaying the labels of bottom layers, so it is mixing all the label. Is it possible to hide label that ...
Michel Andrade's user avatar
2 votes
1 answer
3k views

Using C# + Mapscript + Openlayers

Nowadays i'm using Mapscript and C# to generate and display a Mapfile, but in this way i need to create manualy the interface, is there any way to use Mapscript + Openlayers?
Michel Andrade's user avatar
3 votes
3 answers
3k views

Using Mapscript to create a mapfile from scratch

Following a few online tutorials I have seen, I am trying to create a mapfile from scratch using mapscript. However, when I try to create the layer object, I get an error in the init of mapscript.py; ...
user890's user avatar
  • 5,733
4 votes
2 answers
947 views

Maturity of Mapserver mapscript C# bindings?

I've been thinking about possibly porting an internal custom GIS application built on top of Python / PyQt / Mapscript / GDAL-OGR / PostGis to C#. I was wondering about the maturity of the C# ...
ChristopheD's user avatar