Thanks Martijn for your help, I understand that it doesn't really matter which 
technology someone uses on server side to deliver the data, so I can use SA or  
GeoSA to do this, is it correct? I also think that it only depends of what 
software someone is already using, well in my case OL, GeoExt, Ext, PG, is this 
right? So, as long as the data returned by the server side service is formatted 
as geojson (because point/line/polygon/etc... are stored in my PG db), I can 
use that data in the javascript in my web interface. I don't understand well 
your code, but it should reflect the above info. I've read that SA/GeoSA is 
difficult to understand at the beginning, but it's worth to learn because it 
can be a very strong toolkit to develop future projects. Well you're right 
about the tools, I'm  using mod_wsgi after reading several things in internet, 
also the python DB API driver and now I can connect my PG tables with python, 
but so far I don't understand how to link this with OL protocol or GeoExt url.

Thanks again for you answer and I'd be cool to have some further ideas about 
this.

Cheers,

Gery








__________________________________________________________________________________________
Piensa en el medio ambiente - mantenlo en la pantalla. NO lo imprimas si NO es 
necesario.
Think green - keep it on the screen. Do NOT print if it is NOT necessary.
Denken Sie an die Umwelt - bewahren Sie es auf dem Bildschirm. Drucken Sie 
NICHT, wenn es NICHT notwendig ist.


From: mart...@xs4us.nu
Subject: Re: [sqlalchemy] how to get into PG database, is the "url" the right 
way? newbie question
Date: Sat, 18 Aug 2012 02:36:16 +0200
To: sqlalchemy@googlegroups.com

or take a look at this:
var store = new GeoExt.data.FeatureStore({
    layer: sundials,
    proxy: new GeoExt.data.ProtocolProxy({
        protocol: new OpenLayers.Protocol.HTTP({
            url: "sundials.kml",
            format: new OpenLayers.Format.KML()
        })
    }),
    fields: [
        {name: 'title', type: 'string'},
        {name: 'description', type: 'string'}
    ],
    autoLoad: true
});
which looks way different than your codeā€¦.

use mod_python (better not)use mod_wsgi (Good!)use CGI of FastCGI (not that 
good)
GeoExt uses ext 3.3 which is a hazzard in its own rights since 4.x is so much 
better (consistant) , faster and more stable, I guess GeoExt is over a year 
behind reality. If you use that try if you can wait for GeoExt2
On Aug 18, 2012, at 02:24 , Martijn Moeling <mart...@xs4us.nu> wrote:I have 
made this for my project and I do not see why you are using Openlayers for 
this.This has nothing to do with sqlalchemy. 

off topic: Ext.form.Panel has no 'protocol' so I think you should extend 
FormPanel to include that functionality. Ext.direct is the way to go for stuff 
like this.


On Aug 14, 2012, at 19:05 , Gery <geryherb...@gmail.com> wrote:

any ideas?? basically the idea is how to search inside a database being outside 
the database, especifically through SqlAlchemy from OpenLayers?


On Monday, August 13, 2012 9:23:43 PM UTC+2, Gery wrote:
Hello, I'm new around here and I've been using SQLalchemy (SA) for a while. I 
work with PostGis (PG), OpenLayers (OL), ExtJS, GeoExtJS and now with the great 
SA and GeoAlchemy. I have one problem, I created a model where I defined one 
table of my PG database, it has a url like this: url = 
'postgresql://postgres:password@localhost:5432/pgdb'. In my HTML, I have some 
maps displayed with OL and a toolbar built with ExtJS and GeoExtJS. I put a 
search button there using ExtJS, and the OL protocol code to get the data. This 
protocol has an url option, in this way:

 var searchformPanel = new Ext.form.FormPanel(
        {
                width: 250,
                bodyStyle: 'padding:5px',
                labelAlign: 'top',
                defaults:
                {
                        anchor: '100%'
                },
                protocol: new OpenLayers.Protocol.HTTP(
                {
                        url: 'http://localhost/mop/py/dbmodel.py',
                        format: new OpenLayers.Format.GeoJSON()
                }
                ),
                items:
                etc,etc......

my problem is that in this url I wrote the whole path where my model script is 
located, but after pressing the button I got nothing. I think I need something 
else rather than only pointing the whole path and the python script in the url 
mentioned above, is that correct? I've searched "how to connect sqlalchemy to 
extjs" in google but didn't find any that solved this doubt.

Any support is very welcome, thanks in advance.

Best regards,

Gery


-- 

You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.

To view this discussion on the web visit 
https://groups.google.com/d/msg/sqlalchemy/-/06H8WaCTV7cJ.
 
To post to this group, send email to sqlalchemy@googlegroups.com.

To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.


For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.






-- 

You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.

To post to this group, send email to sqlalchemy@googlegroups.com.

To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.


For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.








-- 

You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.

To post to this group, send email to sqlalchemy@googlegroups.com.

To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.


For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.
                                          

-- 
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com.
To unsubscribe from this group, send email to 
sqlalchemy+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.

Reply via email to