[OpenLayers-Users] Recovery information from a SHP file
Juan Jesús Cremades Monserrat
relicary at gmail.com
Wed Jan 4 07:22:05 EST 2012
Hi,
I've created an application where there is the next code:
featureInfo=new OpenLayers.Control({title: 'Información: Select one layer
and click in the map', type: OpenLayers.Control.TYPE_TOOL});
My Mapfile is this:
MAP
NAME map_generated_by_gvsig
EXTENT -179.99999999999997 -89.99999999998201 180.00000000010002 90.0
SYMBOLSET "mapamundi.sym"
FONTSET "fonts.txt"
LEGEND
IMAGECOLOR -1 -1 -1
LABEL
FONT "vera"
ANGLE FOLLOW
COLOR 0 0 0
ENCODING "UTF-8"
TYPE truetype
SIZE 8
END
STATUS ON
TRANSPARENT ON
END
WEB
METADATA
"ows_enable_request" "*"
"wms_encoding" "UTF-8"
"wms_title" "Mapserver WMS"
"wms_abstract" ""
"wms_srs" " EPSG:4326"
"wms_onlineresource" "
http://localhost:9000/cgi-bin/mapserv.exe?map=E%3A%5Cms4w%5Capps%5Cmapserv-demo%5Cmapamundi.map
"
END
END
PROJECTION
"init=epsg:4326"
END
LAYER
NAME "HYP_50M_SR_W.tif"
STATUS ON
TYPE RASTER
DATA "c:\Documents and Settings\...\HYP_50M_SR_W\HYP_50M_SR_W.tif"
MAXSCALE -1.0
MINSCALE -1.0
TRANSPARENCY 100
PROJECTION
"init=epsg:4326"
END
METADATA
"wms_title" "HYP_50M_SR_W.tif"
"wms_abstract" "Phisic Map"
"wms_extent" "-179.99999999999997 -89.99999999998201
179.99999999996405 90.0"
"gml_include_items" "all"
END
END # Layer
LAYER
NAME "ne_10m_populated_places_simple.shp"
STATUS ON
TYPE POINT
DATA "C:\Documents and
Settings\...\ne_10m_populated_places_simple.shp"
MAXSCALE -1.0
MINSCALE -1.0
TRANSPARENCY 100
SIZEUNITS pixels
PROJECTION
"init=epsg:4326"
END
CLASS
STYLE
COLOR 255 102 51
SIZE 2
END
SYMBOL "square"
NAME "default"
END
METADATA
"wms_title" "ne_10m_populated_places_simple.shp"
"wms_abstract" "Ciudades importantes"
"wms_extent" "-179.58997888396897 -89.98289386134616
179.38330358817018 82.48332318035943"
"gml_include_items" "all"
END
END # Layer
END # Map File
In the ne_10m_populated_places_simple.shp I have a lot of points which
indicate a city and its name is into the SHP file.
Now, I want when some user click's in one of this poins, he can read a
message with the name of the city.
Thanks!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20120104/5d483417/attachment.html
More information about the Users
mailing list