<html>
<head>
<style>
.hmmessage P
{
margin:0px;
padding:0px
}
body.hmmessage
{
FONT-SIZE: 10pt;
FONT-FAMILY:Tahoma
}
</style>
</head>
<body class='hmmessage'>
That looks perfect! Thanks for that tip.<BR>
<BR>
David<BR><BR>> Date: Mon, 7 Jan 2008 07:42:48 +0100<BR>> From: penyaskito@gmail.com<BR>> To: d.pru@hotmail.com<BR>> Subject: Re: [OpenLayers-Users] Selecting a country<BR>> CC: users@openlayers.org<BR>> <BR>> You should use the webservices at http://www.geonames.org/export<BR>> <BR>> As example, I live here :-)<BR>> http://ws.geonames.org/findNearbyPlaceNameJSON?lat=37.867&lng=-5.6<BR>> <BR>> You can make great things using this and an AJAX request.<BR>> Hope this helps.<BR>> <BR>> On Jan 7, 2008 7:05 AM, David Pruitt <d.pru@hotmail.com> wrote:<BR>> ><BR>> > Well, there are a few reasons why using MapServer is out of the question.<BR>> ><BR>> > 1. I am running my mapping application on some server space that I have on<BR>> > the computer science servers here on campus. Although I am granted server<BR>> > space, I obviously have no ability to change the settings to Apache or put<BR>> > MapServer into the cgi-bin of Apache. Therefore, although I can run PHP<BR>> > scripts (which I do), running something like MapServer is out of the<BR>> > question.<BR>> ><BR>> > 2. I am running Apache on my personal machine....and so of course I could<BR>> > install MapServer on here, but my personal machine is not the "production<BR>> > environment"...it is simply the testing environment. The production<BR>> > environment is my server space on the CS servers - and if I can't run<BR>> > MapServer on those servers, there is no point running it on my test server<BR>> > (my personal computer).<BR>> ><BR>> > 3. Even if I did have access to a production server where I could configure<BR>> > Apache how I wanted it to be - I am completely unfamiliar with MapServer and<BR>> > WMS requests - although I am very familiar with HTTP requests and networking<BR>> > in general. WMS is simply a protocol I don't know. In addition, I don't<BR>> > know how to create a map that would work with MapServer.<BR>> ><BR>> > Consequently:<BR>> ><BR>> > I am currently using the free map available at:<BR>> ><BR>> > http://labs.metacarta.com/wms/vmap0?<BR>> ><BR>> > Which is also used in many of the OpenLayers demos. I am thinking, however,<BR>> > of using Google Maps possibly, but I am not sure yet.<BR>> ><BR>> > So this is my dilemma: Under these circumstances, how can I recognize which<BR>> > country a user has clicked on the map?<BR>> ><BR>> > Several months ago at work I made a simple mapping application in Flash (at<BR>> > which time I didn't even know OpenLayers or MapServer existed). For that<BR>> > mapping application we simply overlayed an image of each country on top of<BR>> > itself on the world map, and then the overlayed image acted as a button -<BR>> > thus making it quite simple to tell which country had been clicked. I was<BR>> > hoping to do something similar with OpenLayers in this mapping application<BR>> > that I am currently building, but using the "Features" in OpenLayers to<BR>> > create polygons that I could overlay over each country - and essentially<BR>> > have each polygon act as a button so I could tell which country had been<BR>> > clicked. I noticed however, that if I held my mouse button down on one of<BR>> > these polygons, I could no longer pan around the map...which is definitely a<BR>> > problem.<BR>> ><BR>> > How does the example map at http://world.freemap.in/ accomplish this task?<BR>> > I looked at the code, and although I am new to OpenLayers and this whole WMS<BR>> > thing...it seems like it is making some WMS requests to a MapServer server.<BR>> ><BR>> > Thanks for any help.<BR>> ><BR>> > David<BR>> ><BR>> > > Date: Mon, 7 Jan 2008 06:42:27 +0100<BR>> > > From: eric.c2c@gmail.com<BR>> > > To: d.pru@hotmail.com<BR>> > > Subject: Re: [OpenLayers-Users] Selecting a country<BR>> > > CC: users@openlayers.org<BR>> > ><BR>> > > On Jan 7, 2008 3:22 AM, David Pruitt <d.pru@hotmail.com> wrote:<BR>> > > ><BR>> > > > Let's say I have a user who is looking at my map, and clicks on a<BR>> > specific<BR>> > > > country. What is the best way to recognize which country he clicked on?<BR>> > > ><BR>> > > > I thought using features would be good, but a user can't pan around the<BR>> > map<BR>> > > > if he/she is holding down the mouse button on a feature.<BR>> > > ><BR>> > > > Is there any way to accomplish this WITHOUT using MapServer or GeoServer<BR>> > or<BR>> > > > something of that sort?<BR>> > ><BR>> > > Hello<BR>> > ><BR>> > > If the countries aren't rendered by the browser (and therefore you<BR>> > > don't have information about these countries on the client side) then<BR>> > > you need to send a request to some service to get information on the<BR>> > > clicked country. Have you had some other solution in mind?<BR>> > ><BR>> > > --<BR>> > > Eric<BR>> ><BR>> ><BR>> > ________________________________<BR>> > Make distant family not so distant with Windows Vista(R) + Windows Live™.<BR>> > Start now!<BR>> > _______________________________________________<BR>> > Users mailing list<BR>> > Users@openlayers.org<BR>> > http://openlayers.org/mailman/listinfo/users<BR>> ><BR>> ><BR>> <BR>> <BR>> <BR>> -- <BR>> Regards,<BR>> <BR>> Christian López Espínola<BR><BR><br /><hr />Make distant family not so distant with Windows Vista® + Windows Live™. <a href='http://www.microsoft.com/windows/digitallife/keepintouch.mspx?ocid=TXT_TAGLM_CPC_VideoChat_distantfamily_012008' target='_new'>Start now!</a></body>
</html>