[mapserver-users] web development project with mapserver- questions
Fawcett, David
David.Fawcett at state.mn.us
Thu Mar 19 13:27:44 PDT 2009
I don't have an example handy, but here is one way to do it
conceptually.
You have a script that goes out and gathers the current wind data and
writes it to a MySQL Database or a shapefile.
Using CGI MapServer, your map file uses the database table or shape file
as the data source for your wind stations layer.
With MapServer version >=5.2, you can base the rotation of the symbol on
the value in a column of your data source. See 'attribute binding' in
the documentation.
You use MapServer to output an image map using a query template. The
image map can contain data from different columns in your data source.
I know that I put together an example on this somewhat recently. I will
dig around.
David.
-----Original Message-----
From: Pablo Romero [mailto:romero619 at hotmail.com]
Sent: Thursday, March 19, 2009 3:08 PM
To: David.Fawcett at state.mn.us; mapserver-users at lists.osgeo.org
Subject: RE: [mapserver-users] web development project with mapserver-
questions
David
Thanks for the response.
Divs arent a requirement; I just mentioned them because the example site
that I posted was using divs, so I suggested them more as a point of
reference.
Id be willing to use whatever works, but Id obviously like to avoid
using any hefty solution that could be considered as being 'overkill'.
something simple & lightweight is prefered.
Im not very experienced with mapserver, but would the use of symbols to
add the vector drawings be a feasible solution? can symbols show up on
the image map as clickable regions with mouse-over text?
i.e., something like:
1) use my backend code (php/perl) to generate the markers & select the
appropriate symbol image file & "alt" text
2) pass this info to mapserver prior to drawing the map, & include the
symbols into the map image.
3) create the image map with symbols
does this method sound reasonable/right?
IF so, how would I go about this (creating these custom symbols)? Is
there an existing tutorial that might help me accomplish this?
Thanks again,
P.Romero
----------------------------------------
> Subject: RE: [mapserver-users] web development project with mapserver-
> questions
> Date: Thu, 19 Mar 2009 14:35:20 -0500
> From: David.Fawcett at state.mn.us
> To: romero619 at hotmail.com; mapserver-users at lists.osgeo.org
>
> Do you really need to create divs?
>
> You could use MapServer to put the marker on the map in the correct
> location (as part of the map image) and have MapServer output it as an
> imagemap if all that you need is mouse-over text.
>
> http://mapserver.org/output/imagemaps.html
>
> If you want to do anything much fancier with putting vector markers on
> a map, you might look at something like OpenLayers.
> http://www.openlayers.org/ Probably overkill for what you need, but
> worth a look.
>
> David.
>
> -----Original Message-----
> From: mapserver-users-bounces at lists.osgeo.org
> [mailto:mapserver-users-bounces at lists.osgeo.org] On Behalf Of Pablo
> Romero
> Sent: Thursday, March 19, 2009 2:27 PM
> To: mapserver-users at lists.osgeo.org
> Subject: [mapserver-users] web development project with mapserver-
> questions
>
>
>
> Hi,
> I need help figuring out a method to do the following:
>
> 1) use mapserver to create a basic, static image of a given region,
> say,for example the following area: lat1=0.00 lat2=40.00 lng1=-120.00
> lng2=-40.00 (in decimal degrees)
>
> 2) use css divs or javascript (or both) to create clickable, hyperlink
> "markers" over the map image at specific lat/lon points (similiar to
> google map markers, except over a static map image).
>
> The problem Im having is figuring out a way to create the "marker"
> divs using absolute (pixel) coordinates over the map image. My marker
> locations are in lat/lon, and I would need to translate them to the
> map's image coordinates. I thought about just scaling the points based
> on the maps's bounds and the map image size, but this would only
> provide "linear scaling" which might be fairly inaccurate, and I also
> want a method that will work with most map projections. Does this make
> sense?
>
> Does mapserver provide any automated means of creating such "markers"?
> Or, is there an existing method of translating
>
> Perhaps this question might not be very mapserver-related, but I was
> hoping someone might have experience with this type of setup.
>
> Here's an example of what Im basically trying to emulate:
>
> http://magicseaweed.com/METARStationHome.php?region=9
>
> I dont know if this map image was created with mapserver, but the
> general concept stil applies to mapserver: generate a map projection
> image, and place geo-referenced objects over the map image...
>
> Please help,
> Thanks,
> P.Romero
> _________________________________________________________________
> Windows Live(tm): Life without walls.
> http://windowslive.com/explore?ocid=TXT_TAGLM_WL_allup_1a_explore_0320
> 09
> _______________________________________________
> mapserver-users mailing list
> mapserver-users at lists.osgeo.org
> http://lists.osgeo.org/mailman/listinfo/mapserver-users
_________________________________________________________________
Hotmail(r) is up to 70% faster. Now good news travels really fast.
http://windowslive.com/online/hotmail?ocid=TXT_TAGLM_WL_HM_70faster_0320
09
More information about the MapServer-users
mailing list