Questions tagged [mapscript]

MapScript is an API for MapServer

Filter by
Sorted by
Tagged with
0
votes
1answer
40 views

phpmapscript on Debian Stretch

I installed MapServer 7 and I need phpmapscript. Is there any binary package for phpmapscript for Debian Stretch? I could install PHP 5.6 from binaries (https://stackoverflow.com/questions/46378017/...
1
vote
2answers
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 ...
2
votes
1answer
36 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 ...
6
votes
0answers
280 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 ...
0
votes
1answer
50 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 ...
0
votes
1answer
192 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'...
1
vote
1answer
643 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 ...
1
vote
1answer
311 views

Installing PHP MapScript for MS4W

I have the following version on my machine. But the MapScript is not installing. Can any one help?
1
vote
0answers
165 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 ...
1
vote
0answers
48 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....
1
vote
1answer
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 ...
1
vote
2answers
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 ...
3
votes
1answer
721 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/...
1
vote
1answer
370 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, ...
2
votes
1answer
2k 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?
0
votes
2answers
619 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 (...
1
vote
1answer
941 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 ...
1
vote
0answers
89 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....
6
votes
1answer
961 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) ...
4
votes
2answers
670 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?
1
vote
1answer
166 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?
1
vote
0answers
299 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 ...
0
votes
1answer
157 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 ...
0
votes
1answer
262 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 ...
0
votes
1answer
2k views

How to install python-mapscript in a 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 ...
2
votes
0answers
258 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/...
1
vote
0answers
1k views

how to write the code to load tiff image on openlayer.layer.wms using mapserver ms4w

where did i get miss up?! here is my code inside the mapfile.map LAYER NAME "layername" STATUS OFF TYPE RASTER DATA "...
3
votes
1answer
1k 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, ...
0
votes
1answer
729 views

How to set 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('...
1
vote
1answer
529 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....
0
votes
1answer
30 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?
3
votes
2answers
147 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 ...
0
votes
1answer
840 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" ...
1
vote
0answers
570 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-...
1
vote
2answers
681 views

Python Mapscript 6.0.1 layer.getShape API

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....
2
votes
1answer
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 ...
3
votes
1answer
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 ...
4
votes
1answer
163 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 ...
2
votes
2answers
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? Thanks!...
1
vote
0answers
506 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 ...
3
votes
3answers
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; ...
3
votes
1answer
580 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 ...
2
votes
1answer
355 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 ...
4
votes
2answers
892 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# ...