Re: [pmapper-users] Add point in MySQL database
Brought to you by:
arminburger
From: Armin B. <arm...@gm...> - 2006-12-01 17:39:02
|
just discovered that mails with zip attachments seem not to pass through the mail filters of Sourceforge. Another try: rename the file from *.txt to *.zip. Also as suggestion for future postings. armin <<<< "Hi all, I'm sorry for the late answer. This mail would answer to Tiziano's mail (points of interest and PEAR). As attachmanet you can find four files that improved pmapper with the possibility to insert new points in a postgis table. Armin sent to me and I modified for my aims (it works of sure on pmapper 1.9.5, pmapper 2.1.2 and now pmapper 3.0.0-beta1). I have the following configuration in pmapper 3.0.0-beta1: /var/www/html/pmapper-3.0.0-beta1/digitizedlg.phtml /var/www/html/pmapper-3.0.0-beta1/incphp/digitize.php /var/www/html/pmapper-3.0.0-beta1/incphp/xajax/x_digitize.php /var/www/html/pmapper-3.0.0-beta1/javascript/digitize.js digitizedlg.phtml: modify the insert-page digitize.php: change the connection to postgres (dbname, dbowner, dbpassword, port ...) digitize.js: change the width and the height of the insert-page I modified the following file to create the insert-button: 1) /var/www/html/pmapper-3.0.0-beta1/config/default/php_config.php: in the "$buttons = array" I added: "digitize" => array(_p("Digitize"), "0"), 2) /var/www/html/pmapper-3.0.0-beta1/javascript/pmapper.js in the "Function for state buttons (CLICKED TOOLS:..." I added || tdid == 'digitize' || 3) I change the name of the "coords_off" button to "digitize_off" button in the /var/www/html/pmapper-3.0.0-beta1/images/buttons/default folder 4) In the map file I set the connection to postggis in the following way LAYER CONNECTIONTYPE postgis NAME "siti3" CONNECTION "user=youruser password=yourpassword dbname=yourdbname host=localhost port=5432" DATA "geometry from (select oid,geometry..-your_table's_field_here-...,id from siti3) as newtable using unique OID" TYPE POINT TOLERANCE 10 TOLERANCEUNITS pixels PROJECTION "init=epsg:26591" END .... I hope to be usefull. if you need more help please tell me. bye Ale" >>>> armin Chris Beaart wrote: > I have already created a MySQL database and a table with some fields such as > x and y. In my map-file I added some lines, so I can visualize the MySQL > records as a point layer. Now I like to create a new tool. With this new > tool I would like to click somewhere in the map, retrieve de x,y-coordinates > and add the values in the MySQL database. > > > > Can somebody please help me. > > > > Thanks, > > Chris Beaart. > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share your > opinions on IT & business topics through brief surveys - and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > pmapper-users mailing list > pma...@li... > https://lists.sourceforge.net/lists/listinfo/pmapper-users > |