using asp and mapserver to put an image at a lat/lon
ed at TOPOZONE.COM
Thu May 12 10:41:10 EDT 2005
Welcome to the list! Part of the problem is that you're asking a very
long list of questions - that makes it harder for anyone to pick up the
ball and respond.
I know you have looked at the archives and seen my postings on ASP
usage. Please read them carefully, as there's a lot there and some code
You are on the right track in thinking about using ASP code to generate
MapServer HTTP requests, then directing those requests to MapServer and
retrieving the results. This is not the same as "ASP MapScript" - it
has some advantages and disadvantages.
The chief advantage is that you are insulated from errors due to
improper use of MapScript. MapServer HTTP GET requests are handled
"correctly" and you don't have to worry about using objects properly,
forgetting to do intermediate steps, etc. That's also the chief
disadvantage - you don't get any flexibility or control over and above
what the MapServer CGI offers.
Remember that MapServer offers two different HTTP GET interfaces - the
"classic" CGI interface and the OGC WMS interface. Each has its
advantages, and one or the other may be more suitable for your
application. In either case, you can create an ASP page that issues an
HTTP request and retrieves the output image.
Your specific question about adding an image needs a bit more
information. If your image is a logo or graphic or copyright message
that goes in a fixed location, you can do that - there are plenty of
references to that topic in the archives. If you're adding a symbol at
a geographic location, you can do that, too. Both are mentioned in the
documentation - look for the use of querystring parameters to override
settings in the MAP file.
Don't get your ASP work confused with basic MapServer functionality. If
you look for "how do I add a symbol at a fixed location using ASP" you
won't find it. But you can find out how to add a symbol using the CGI
interface, and you can retrieve that image using ASP.
It's best to get something partially working and then post your code and
MAP file with a question. It is MUCH easier for people to answer
questions by correcting or modifying an example, rather than asking them
to start from scratch.
Please get some basic map up and running and send us an example. If you
can post it on a publicly accessible server so we can look at the
output, that's even better. Thanks!
President and Chief Mapmaker
TopoZone.com / Maps a la carte, Inc.
73 Princeton Street, Suite 305
North Chelmsford, MA 01863
ed at topozone.com
From: UMN MapServer Users List [mailto:MAPSERVER-USERS at LISTS.UMN.EDU] On
Behalf Of Andrea Edwards
Sent: Tuesday, May 10, 2005 10:47 AM
To: MAPSERVER-USERS at LISTS.UMN.EDU
Subject: [UMN_MAPSERVER-USERS] using asp and mapserver to put an image
at a lat/lon coordinate
I am new to mapserver and I am really struggling. Any help would be
I want to use mapserver for an internet mapping application but I do
not want to use php or perl. I would prefer to use asp. However, this
precludes my use of mapscript.
For my application I need to be able to access some gps coordinates
from a database and then position a graphic on top of the map at this
I have only a basic knowledge of mapserver. I believe that I can
dynamically change map file parameters via a form or url. In theory
therefore I can create a get request in my asp code and send this to
mapserver using an asp component such asphttp (I have seen this
discussed in the archives).
I believe that to add an image to a map I have to use a symbol and set
its type to pixmap. However, I cannot see any parameters for specifying
the location of the image in the map in (x,y) coordinates. Am I on the
right track? Please can you tell me how I specify the location of the
I want to know if it's possible to access the mapserver c api directly
from asp. I have seen a resource called VisualBasic.Net GIS which
accesses mapserver so it must be possible though I expect its not a
trivial task. Whilst this library is very useful it does not seem to
have any features for positioning graphics at a certain coordinate.
I guess I am hoping there is an asp equivalent of mapscript somewhere
that I can use or buy.
I have used aspmap which I think is very good. However, I would really
like to use mapserver because I would really like to make use of its
ability to return flash vector files. That way I can do all my zooming
and panning on the client in flash (one day when I know how)
Thank you very much. Please help!!
More information about the mapserver-users