[mapserver-commits] r11464 - in trunk/mapserver: . mapscript/php
svn at osgeo.org
svn at osgeo.org
Tue Apr 5 11:15:06 EDT 2011
Author: aboudreault
Date: 2011-04-05 08:15:06 -0700 (Tue, 05 Apr 2011)
New Revision: 11464
Modified:
trunk/mapserver/HISTORY.TXT
trunk/mapserver/mapscript/php/image.c
trunk/mapserver/mapscript/php/labelcachemember.c
trunk/mapserver/mapscript/php/layer.c
trunk/mapserver/mapscript/php/php_mapscript.c
trunk/mapserver/mapscript/php/php_mapscript.h
trunk/mapserver/mapscript/php/web.c
Log:
Updated PHP/MapScript with the new object properties (#3735)
Modified: trunk/mapserver/HISTORY.TXT
===================================================================
--- trunk/mapserver/HISTORY.TXT 2011-04-05 14:29:38 UTC (rev 11463)
+++ trunk/mapserver/HISTORY.TXT 2011-04-05 15:15:06 UTC (rev 11464)
@@ -15,6 +15,8 @@
Current Version (SVN trunk):
----------------------------
+- Updated PHP/MapScript with the new objects properties (#3735)
+
- KML: set layeer's projection when it is not defined (#3809)
- Updated xml mapfile schema and xsl with the new lexer properties (#3735)
Modified: trunk/mapserver/mapscript/php/image.c
===================================================================
--- trunk/mapserver/mapscript/php/image.c 2011-04-05 14:29:38 UTC (rev 11463)
+++ trunk/mapserver/mapscript/php/image.c 2011-04-05 15:15:06 UTC (rev 11464)
@@ -85,6 +85,8 @@
IF_GET_LONG("width", php_image->image->width)
else IF_GET_LONG("height", php_image->image->height)
+ else IF_GET_LONG("resolution", php_image->image->resolution)
+ else IF_GET_LONG("resolutionfactor", php_image->image->resolutionfactor)
else IF_GET_STRING("imagepath", php_image->image->imagepath)
else IF_GET_STRING("imageurl", php_image->image->imageurl)
else IF_GET_STRING("imagetype", php_image->image->format->name)
@@ -116,6 +118,8 @@
else IF_SET_STRING("imageurl", php_image->image->imageurl, value)
else IF_SET_STRING("imagetype", php_image->image->format->name, value)
else if ( (STRING_EQUAL("width", property)) ||
+ (STRING_EQUAL("resolution", property)) ||
+ (STRING_EQUAL("resolutionfactor", property)) ||
(STRING_EQUAL("height", property)) )
{
mapscript_throw_exception("Property '%s' is read-only and cannot be set." TSRMLS_CC, property);
Modified: trunk/mapserver/mapscript/php/labelcachemember.c
===================================================================
--- trunk/mapserver/mapscript/php/labelcachemember.c 2011-04-05 14:29:38 UTC (rev 11463)
+++ trunk/mapserver/mapscript/php/labelcachemember.c 2011-04-05 15:15:06 UTC (rev 11464)
@@ -74,6 +74,7 @@
else IF_GET_LONG("numstyles", php_labelcachemember->labelcachemember->numstyles)
else IF_GET_LONG("shapeindex", php_labelcachemember->labelcachemember->shapeindex)
else IF_GET_LONG("status", php_labelcachemember->labelcachemember->status)
+ else IF_GET_LONG("markerid", php_labelcachemember->labelcachemember->markerid)
else IF_GET_LONG("tileindex", php_labelcachemember->labelcachemember->tileindex)
else IF_GET_OBJECT("point", mapscript_ce_point, php_labelcachemember->point, &php_labelcachemember->labelcachemember->point)
else IF_GET_OBJECT("label", mapscript_ce_label, php_labelcachemember->label, &php_labelcachemember->labelcachemember->label)
@@ -110,6 +111,7 @@
(STRING_EQUAL("numstyles", property)) ||
(STRING_EQUAL("shapeindex", property)) ||
(STRING_EQUAL("status", property)) ||
+ (STRING_EQUAL("markerid", property)) ||
(STRING_EQUAL("tileindex", property)) ||
(STRING_EQUAL("label", property)) ||
(STRING_EQUAL("styles", property)) ||
Modified: trunk/mapserver/mapscript/php/layer.c
===================================================================
--- trunk/mapserver/mapscript/php/layer.c 2011-04-05 14:29:38 UTC (rev 11463)
+++ trunk/mapserver/mapscript/php/layer.c 2011-04-05 15:15:06 UTC (rev 11464)
@@ -267,6 +267,7 @@
else IF_GET_DOUBLE("labelmaxscaledenom", php_layer->layer->labelmaxscaledenom)
else IF_GET_LONG("minfeaturesize", php_layer->layer->minfeaturesize)
else IF_GET_LONG("maxfeatures", php_layer->layer->maxfeatures)
+ else IF_GET_LONG("startindex", php_layer->layer->startindex)
else IF_GET_LONG("annotate", php_layer->layer->annotate)
else IF_GET_LONG("transform", php_layer->layer->transform)
else IF_GET_LONG("labelcache", php_layer->layer->labelcache)
@@ -288,6 +289,7 @@
else IF_GET_OBJECT("offsite", mapscript_ce_color, php_layer->offsite, &php_layer->layer->offsite)
else IF_GET_OBJECT("grid", mapscript_ce_grid, php_layer->grid, (graticuleObj *)(php_layer->layer->layerinfo))
else IF_GET_OBJECT("metadata", mapscript_ce_hashtable, php_layer->metadata, &php_layer->layer->metadata)
+ else IF_GET_OBJECT("bindvals", mapscript_ce_hashtable, php_layer->bindvals, &php_layer->layer->bindvals)
else IF_GET_OBJECT("cluster", mapscript_ce_cluster, php_layer->cluster, &php_layer->layer->cluster)
else IF_GET_OBJECT("projection", mapscript_ce_projection, php_layer->projection, &php_layer->layer->projection)
else
@@ -333,6 +335,7 @@
else IF_SET_DOUBLE("labelminscaledenom", php_layer->layer->labelminscaledenom, value)
else IF_SET_DOUBLE("labelmaxscaledenom", php_layer->layer->labelmaxscaledenom, value)
else IF_SET_LONG("maxfeatures", php_layer->layer->maxfeatures, value)
+ else IF_SET_LONG("startindex", php_layer->layer->startindex, value)
else IF_SET_LONG("annotate", php_layer->layer->annotate, value)
else IF_SET_LONG("transform", php_layer->layer->transform, value)
else IF_SET_LONG("labelcache", php_layer->layer->labelcache, value)
@@ -353,6 +356,7 @@
else if ( (STRING_EQUAL("offsite", property)) ||
(STRING_EQUAL("grid", property)) ||
(STRING_EQUAL("metadata", property)) ||
+ (STRING_EQUAL("bindvals", property)) ||
(STRING_EQUAL("projection", property)) ||
(STRING_EQUAL("cluster", property)) )
{
@@ -1904,6 +1908,7 @@
if (php_layer->grid && Z_TYPE_P(php_layer->grid) == IS_OBJECT)
MAPSCRIPT_DELREF(php_layer->grid);
MAPSCRIPT_DELREF(php_layer->metadata);
+ MAPSCRIPT_DELREF(php_layer->bindvals);
MAPSCRIPT_DELREF(php_layer->cluster);
MAPSCRIPT_DELREF(php_layer->projection);
}
@@ -1992,6 +1997,7 @@
if (php_layer->grid && Z_TYPE_P(php_layer->grid) == IS_OBJECT)
MAPSCRIPT_DELREF(php_layer->grid);
MAPSCRIPT_DELREF(php_layer->metadata);
+ MAPSCRIPT_DELREF(php_layer->bindvals);
MAPSCRIPT_DELREF(php_layer->cluster);
MAPSCRIPT_DELREF(php_layer->projection);
@@ -2016,6 +2022,7 @@
php_layer->offsite = NULL;
php_layer->grid = NULL;
php_layer->metadata = NULL;
+ php_layer->bindvals = NULL;
php_layer->cluster = NULL;
php_layer->projection = NULL;
Modified: trunk/mapserver/mapscript/php/php_mapscript.c
===================================================================
--- trunk/mapserver/mapscript/php/php_mapscript.c 2011-04-05 14:29:38 UTC (rev 11463)
+++ trunk/mapserver/mapscript/php/php_mapscript.c 2011-04-05 15:15:06 UTC (rev 11464)
@@ -1171,6 +1171,7 @@
REGISTER_LONG_CONSTANT("MS_IMAGEMODE_INT16", MS_IMAGEMODE_INT16, const_flag);
REGISTER_LONG_CONSTANT("MS_IMAGEMODE_FLOAT32", MS_IMAGEMODE_FLOAT32, const_flag);
REGISTER_LONG_CONSTANT("MS_IMAGEMODE_BYTE", MS_IMAGEMODE_BYTE, const_flag);
+ REGISTER_LONG_CONSTANT("MS_IMAGEMODE_FEATURE", MS_IMAGEMODE_FEATURE, const_flag);
REGISTER_LONG_CONSTANT("MS_IMAGEMODE_NULL", MS_IMAGEMODE_NULL, const_flag);
/*binding types*/
@@ -1189,7 +1190,10 @@
REGISTER_LONG_CONSTANT("MS_LABEL_BINDING_OUTLINECOLOR", MS_LABEL_BINDING_OUTLINECOLOR, const_flag);
REGISTER_LONG_CONSTANT("MS_LABEL_BINDING_FONT", MS_LABEL_BINDING_FONT, const_flag);
REGISTER_LONG_CONSTANT("MS_LABEL_BINDING_PRIORITY", MS_LABEL_BINDING_PRIORITY, const_flag);
-
+ REGISTER_LONG_CONSTANT("MS_LABEL_BINDING_POSITION", MS_LABEL_BINDING_POSITION, const_flag);
+ REGISTER_LONG_CONSTANT("MS_LABEL_BINDING_SHADOWSIZEX", MS_LABEL_BINDING_SHADOWSIZEX, const_flag);
+ REGISTER_LONG_CONSTANT("MS_LABEL_BINDING_SHADOWSIZEY", MS_LABEL_BINDING_SHADOWSIZEY, const_flag);
+
/*cgi request types*/
REGISTER_LONG_CONSTANT("MS_GET_REQUEST", MS_GET_REQUEST, const_flag);
REGISTER_LONG_CONSTANT("MS_POST_REQUEST", MS_POST_REQUEST, const_flag);
Modified: trunk/mapserver/mapscript/php/php_mapscript.h
===================================================================
--- trunk/mapserver/mapscript/php/php_mapscript.h 2011-04-05 14:29:38 UTC (rev 11463)
+++ trunk/mapserver/mapscript/php/php_mapscript.h 2011-04-05 15:15:06 UTC (rev 11464)
@@ -303,6 +303,7 @@
zval *offsite;
zval *grid;
zval *metadata;
+ zval *bindvals;
zval *projection;
zval *cluster;
int is_ref;
Modified: trunk/mapserver/mapscript/php/web.c
===================================================================
--- trunk/mapserver/mapscript/php/web.c 2011-04-05 14:29:38 UTC (rev 11463)
+++ trunk/mapserver/mapscript/php/web.c 2011-04-05 15:15:06 UTC (rev 11464)
@@ -75,6 +75,7 @@
else IF_GET_STRING("imagepath", php_web->web->imagepath)
else IF_GET_STRING("template", php_web->web->template)
else IF_GET_STRING("imageurl", php_web->web->imageurl)
+ else IF_GET_STRING("temppath", php_web->web->temppath)
else IF_GET_STRING("header", php_web->web->header)
else IF_GET_STRING("footer", php_web->web->footer)
else IF_GET_STRING("empty", php_web->web->empty)
@@ -116,6 +117,7 @@
else IF_SET_STRING("imagepath", php_web->web->imagepath, value)
else IF_SET_STRING("template", php_web->web->template, value)
else IF_SET_STRING("imageurl", php_web->web->imageurl, value)
+ else IF_SET_STRING("temppath", php_web->web->temppath, value)
else IF_SET_STRING("header", php_web->web->header, value)
else IF_SET_STRING("footer", php_web->web->footer, value)
else IF_SET_STRING("mintemplate", php_web->web->mintemplate, value)
More information about the mapserver-commits
mailing list