[OpenLayers-Users] Regarding calculating locations for a map

Lasith Chandrasekara lasithc at gmail.com
Mon Oct 26 07:26:41 EDT 2009


In case if you need my map file used to connect post gis with map server
here it is,

NAME "Sri Lanka Map"
SIZE 400 400
STATUS ON

EXTENT -437201.366774 78322.754457 326493.592543 541029.724757

UNITS METERS
SHAPEPATH "data/srilanka"

WEB
    TEMPLATE "in.xml"

    IMAGEPATH "/ms4w/Apache/htdocs/tmp/ms_tmp/" 
    IMAGEURL "/ms_tmp/"

    METADATA

	"wms_title"   "Sri Lanka WMS"
    	"wms_onlineresource"
"http://127.0.0.1/cgi-bin/mapserv.exe?MAP=/ms4w/Apache/htdocs/map/srilanka.map"
    	"wms_srs"   "EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326 EPSG:4015"
    	"wms_feature_info_mime_type" "text/html"
    	"wms_abstract" "Sri Lanka Map"

    	"wfs_title"   "Sri Lanka WFS"
    	"wfs_onlineresource"
"http://127.0.0.1/cgi-bin/mapserv.exe?MAP=/ms4w/Apache/htdocs/map/srilanka.map"
    	"wfs_srs"   "EPSG:42304 EPSG:42101 EPSG:4269 EPSG:4326 EPSG:4015"
    	"wfs_schemas_location" "http://geoservices.org"

    END

END

LAYER
 NAME roads
  TYPE LINE
  STATUS ON
  #DATA  road
  CONNECTIONTYPE postgis
  CONNECTION "user=postgres password=xxxx dbname=srilanka host=localhost"
  DATA "the_geom from road3"
  CLASS
    NAME "roads"
    STYLE
      COLOR 211 59 95
    END
  END
END # Layer roads





Lasith Chandrasekara wrote:
> 
> I am currently developing a shortest path application for my MSc degree
> project.
> Road information are stored in the postgis table and there I can find
> geometries for all the roads.
> 
> But I am having few issues when selecting from and to location from GUI
> (open layers). Where I have to provide a facility for users to select from
> and to locations on the map by clicking the mouse. If the user has done a
> drag, zoom in, zoom out operations on the map, then those changes to the
> map will reflect to those location cordinates as well.
> 
> Please suggest a way to resolve this issue by providing a simple example.
> Following is a part of data insertion and create of roads table sql.
> So you can provide more straight forward answer to me  I guess that we may
> have to deal with projections here (not sure).
> 
> ------------------------------------------------
> BEGIN;
> CREATE TABLE "database"."roadstable" (gid serial PRIMARY KEY,
> "fnode_" int8,
> "tnode_" int8,
> "lpoly_" int8,
> "rpoly_" int8,
> "length" float8,
> "road_" int8,
> "road_id" int8,
> "code" int2,
> "class" varchar(4));
> SELECT
> AddGeometryColumn('database','roadstable','the_geom','-1','MULTILINESTRING',2);
> INSERT INTO "database"."roadstable"
> ("fnode_","tnode_","lpoly_","rpoly_","length","road_","road_id","code","class",the_geom)
> VALUES
> ('256','255','0','0','4828.497000','1','1','3',NULL,'01050000000100000001020000002700000000000060430EF4400000006023391D41000000C08B08F4400000000030391D4100000080AD00F440000000C03E391D4100000000C2F8F3400000008040391D41000000C0E3F0F340000000C039391D41000000A005E9F340000000C044391D410000006042E1F340000000E079391D41000000E099D9F34000000080E0391D4100000080F1D1F34000000060623A1D410000006056CAF340000000C0E73A1D4100000000AEC2F34000000020653B1D410000000013BBF34000000060F33B1D41000000806AB3F34000000000743C1D41000000A0B4ABF34000000080BD3C1D41000000C0FEA3F340000000C0AE3C1D41000000803B9CF340000000605C3C1D41000000C06A94F34000000040F13B1D41000000009A8CF340000000C0973B1D4100000040C984F340000000A05A3B1D4100000080F87CF34000000020213B1D41000000403575F340000000A0D83A1D41000000607F6DF340000000606D3A1D41000000C0F165F34000000080E0391D41000000A0715EF3400000000049391D4100000080D656F340000000C0BF381D41000000202E4FF3400000002041381D41000000A08547F34000000080C8371D41000000C0CF3FF340000000C065371D4100000000FF37F3400000006021371D41000000000630F34000000020E4361D41000000000D28F34000000020C4361D41000000C04920F34000000000E0361D41000000E0F118F340000000C05D371D41000000600512F340000000C048381D41000000C0330BF340000000C05C391D41000000E03904F34000000080513A1D41000000E0FCFCF240000000000F3B1D410000008097F5F240000000A0B83B1D41000000C0D7E9F24000000020BF3C1D41');
> 
> 
> 

-- 
View this message in context: http://n2.nabble.com/Regarding-calculating-locations-for-a-map-tp3891388p3891419.html
Sent from the OpenLayers Users mailing list archive at Nabble.com.



More information about the Users mailing list