Adding a shape to a map dynamically
Steve Lime
Steve.Lime at DNR.STATE.MN.US
Fri Mar 9 08:49:19 PST 2007
What technology options do you have? Are you using MapScript, the CGI, any particular client?
Many of the clients have their own abilities here.
With MapScript I would define your presentation layer ahead of time in the mapfile, build a shapeObj and add it to the layer, then draw the layer or map.
With the CGI you can define inline features at runtime. Here's an example (w/a point):
http://maps.dnr.state.mn.us/cgi-bin/mapserv410?map=/usr/local/mapserver/apps/waters/csg/reference.map&mode=map&layer=site&map_site_feature_points=342601.236380747+5193344.65190589
There is a presentation layer called "site" that I add one point to. Same approach would apply to a polygon, just more points (first=last).
Steve
>>> On 3/9/2007 at 10:26 AM, in message
<259e26270703090826n232af065ndf0436ec711e2489 at mail.gmail.com>, Ben Tuttle
<funkbucket at GMAIL.COM> wrote:
> Hi all-
> I'd like to overlay a polygon on my map based on coordinates input
> form a form. I'm wondering what the best way would be to do this.
> My first thoughts were to either add a layer dynamically as an inline
> feature or perhaps to create a shapeObj (not sure if this will work as
> expected) and draw it. Any thoughts on the best way to do something
> like this?
More information about the MapServer-users
mailing list