[Geomoose-users] Feature Editor: Polygon_update and Polygon_delete
Errors
Brent Fraser
bfraser at geoanalytic.com
Sun Dec 11 15:37:09 EST 2011
Have a look at
http://www.geomoose.org/docs/feature_editor.html
Best Regards,
Brent Fraser
On 12/11/2011 1:24 PM, Atif Butt wrote:
> I got your point now, I was thinking it may be setup already.
> Any how from where you want me to start (any document reference or URL
> talking about delete and modify service ), Or you suggest me to see
> the builtin service of geomoose (in relation to modify /delete polygon).
> Give me your suggestions
> Thanks and regards
> Atif
>
> On Sun, Dec 11, 2011 at 3:18 PM, Brent Fraser <bfraser at geoanalytic.com
> <mailto:bfraser at geoanalytic.com>> wrote:
>
> Atif,
>
> The Feature Editor doc on the Geomoose site uses the results of
> the Identify operation to render a link to delete the selected
> feature. Your mapbook creates a "delete_polygon" button on the
> tool bar referencing the a delete_polygon service:
>
> <service name="delete_polygon">
> <url>php/editor.php</url>
> <step type="input">
> <input type="hidden" name="op" value="delete"/>
> <input type="hidden" name="table" value="test_polygons"/>
> <input type="hidden" name="feature:polygon_id"/>
> </step>
> </service>
>
> Since your service has no spatial step (only a form input step),
> there is no way for the user to select the polygon to delete.
>
> You need to look at the Feature Editor doc and get your editing
> functions working as documented first, then you would be in a
> better position to expand it by adding tool bar buttons to do
> delete and modify.
>
> Best Regards,
> Brent Fraser
>
>
> On 12/11/2011 12:54 PM, Atif Butt wrote:
>> Hi Brent
>> I used the following code, for the identify.html file.
>> Kindly have a look. http://141.117.248.26/geomoose2/geomoose.html
>> <!-- MapServer Template -->
>>
>> <tr bgcolor="#AA55AA">
>>
>> <td colspan="2"><b>[title] ([polygon_id])</b></td>
>>
>> </tr>
>>
>> <tr>
>>
>> <td>Owner:</td><td>[owner]</td>
>>
>> </tr>
>>
>> <tr>
>>
>> <td>
>>
>> <a href="javascript:GeoMOOSE.startService('modify_polygon',
>> {'feature:polygon_id' : '[polygon_id]','feature:wkb_geometry' :
>> '[wkt_geometry]', 'feature:title' : '[title]', 'feature:owner' :
>> '[owner]'})">Edit</a>
>>
>> </td>
>>
>> <td>
>>
>> <a href="javascript:if(confirm('Are you sure you want to delete
>> this?')) { GeoMOOSE.startService('delete_polygon',
>> {'feature:polygon_id' : '[polygon_id]'}); }">Delete</a>
>>
>> </td>
>>
>> </tr>
>>
>> Secondly, why the above geomoose link can only be working inside
>> firefox, why not IE, and chrome, etc. Do you have any idea ?
>>
>> Best regards
>> Atif
>> On Wed, Dec 7, 2011 at 10:20 AM, Brent Fraser
>> <bfraser at geoanalytic.com <mailto:bfraser at geoanalytic.com>> wrote:
>>
>> Well the PHP is pretty simple for the delete:
>>
>> } else if($operation == 'delete') {
>> if($feature_info[$primaryKeyColumn] < 1) {
>> print 'No Feature ID specified to
>> delete.<br/>';
>> die;
>> }
>>
>> So what that tells me is that the value passed from the
>> browser is <1. Possibly your identity.html has a syntax
>> problem? And what is the content of the "Delete" link when
>> you do an identify on the polygon?
>>
>> Best Regards,
>> Brent Fraser
>>
>>
>> On 12/6/2011 11:03 PM, Atif Butt wrote:
>>>
>>> Yes
>>>
>>> this is my test_polygon.ini file settings
>>>
>>> ; Basic Connection Information
>>> host=localhost
>>> dbname=postgis
>>> username=postgres
>>> password=xxxxxxx
>>>
>>> ; Table Information
>>> tablename=test_polygons
>>> geometry_column=wkb_geometry
>>> primary_key_column=polygon_id
>>> primary_key_sequence=test_polygons_seq
>>> srid=26915
>>>
>>> ; Required Columns
>>> ; This is a comma separated list of columns required
>>> ; for creating or updating features in this layer
>>> required_for_create=wkb_geometry,title
>>> required_for_update=title
>>>
>>> ; GeoMOOSE Information
>>> layerpath=poly_editor/polygons
>>>
>>>
>>> Regards
>>> Atif
>>>
>>>
>>> On Tue, Dec 6, 2011 at 11:24 PM, Brent Fraser
>>> <bfraser at geoanalytic.com <mailto:bfraser at geoanalytic.com>>
>>> wrote:
>>>
>>> Do you have the primary_key_column defined in the ini file?
>>>
>>> Best Regards,
>>> Brent Fraser
>>>
>>>
>>> On 12/6/2011 7:24 PM, Atif Butt wrote:
>>>>
>>>> Hi
>>>>
>>>> Is there any other steps needs to do (except written
>>>> inside the feature editor document) for "polygon_update
>>>> and ploygon_delete". Because after doing these steps,
>>>> when I use update polygon feature I am getting this
>>>> message (1No Feature ID available for update.) and when
>>>> I use delete_polygon tool, it says "No Feature ID
>>>> specified to delete."
>>>>
>>>> I think something is missing.
>>>>
>>>> kindly check
>>>> (http://99.243.192.221/geomoose2/geomoose.html) and
>>>> give me your suggestions.
>>>>
>>>> Best Regards
>>>>
>>>> Atif
>>>>
>>>>
>>>>
>>>> _______________________________________________
>>>> Geomoose-users mailing list
>>>> Geomoose-users at lists.osgeo.org <mailto:Geomoose-users at lists.osgeo.org>
>>>> http://lists.osgeo.org/mailman/listinfo/geomoose-users
>>>
>>>
>>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/geomoose-users/attachments/20111211/8fd9d8ec/attachment-0001.html
More information about the Geomoose-users
mailing list