Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Country select
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  24 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
duncs  
View profile  
 More options Sep 2 2008, 9:40 am
From: duncs <duncan.aus...@gmail.com>
Date: Tue, 2 Sep 2008 06:40:45 -0700 (PDT)
Local: Tues, Sep 2 2008 9:40 am
Subject: Country select
Hi

I've been a web developer for many years, but haven't really done much
with Google Maps yet, so please be gentle...

I want to have a world map where people click on a country to select
it. It should either update a form field with the country name or
redirect to that countries section of the site. Basically, this is to
replace the conventional country select list (which I'll also have for
people who prefer that).

Is this possible? I just want to select a country.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
geocodezip@gmail.com  
View profile  
 More options Sep 2 2008, 9:49 am
From: "geocode...@gmail.com" <geocode...@gmail.com>
Date: Tue, 2 Sep 2008 06:49:07 -0700 (PDT)
Local: Tues, Sep 2 2008 9:49 am
Subject: Re: Country select

duncs wrote:
> Hi

> I've been a web developer for many years, but haven't really done much
> with Google Maps yet, so please be gentle...

> I want to have a world map where people click on a country to select
> it. It should either update a form field with the country name or
> redirect to that countries section of the site. Basically, this is to
> replace the conventional country select list (which I'll also have for
> people who prefer that).

> Is this possible? I just want to select a country.

Yes.  You will need to use a third-party reverse geocoder or a GIS
database with the boundaries of the country polygons.
http://groups.google.com/group/Google-Maps-API/web/resources-non-goog...

  -- Larry


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marcelo  
View profile  
 More options Sep 2 2008, 9:53 am
From: marcelo <marcelo...@hotmail.com>
Date: Tue, 2 Sep 2008 06:53:03 -0700 (PDT)
Local: Tues, Sep 2 2008 9:53 am
Subject: Re: Country select
On Sep 2, 3:40 pm, duncs <duncan.aus...@gmail.com> wrote:

> Is this possible?

If you've been a developer for many years, you should know better than
to ask that question. Everything is possible, you just have to code
it! :-)

Click anywhere in the US to get county info:
http://maps.forum.nu/gm_main.html

County instead of country, but same principle.

--
Marcelo - http://maps.forum.nu
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
duncs  
View profile  
 More options Sep 2 2008, 10:09 am
From: duncs <duncan.aus...@gmail.com>
Date: Tue, 2 Sep 2008 07:09:42 -0700 (PDT)
Local: Tues, Sep 2 2008 10:09 am
Subject: Re: Country select

> If you've been a developer for many years, you should know better than
> to ask that question. Everything is possible, you just have to code
> it! :-)

ah, but no easy way? If it's too much of a mission then we'll probably
just go for an autocomplete or something like that.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marcelo  
View profile  
 More options Sep 2 2008, 10:39 am
From: marcelo <marcelo...@hotmail.com>
Date: Tue, 2 Sep 2008 07:39:07 -0700 (PDT)
Local: Tues, Sep 2 2008 10:39 am
Subject: Re: Country select
On Sep 2, 4:09 pm, duncs <duncan.aus...@gmail.com> wrote:

> ah, but no easy way? If it's too much of a mission then we'll probably
> just go for an autocomplete or something like that.

Easy never got rich! :-)

It's not too much work really, as long as you have the skills.
After having done it once, I can do it again in less than 1 hour.

--
Marcelo - http://maps.forum.nu
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bratliff  
View profile  
 More options Sep 2 2008, 10:40 am
From: bratliff <bratl...@umich.edu>
Date: Tue, 2 Sep 2008 07:40:31 -0700 (PDT)
Local: Tues, Sep 2 2008 10:40 am
Subject: Re: Country select
On Sep 2, 1:40 pm, duncs <duncan.aus...@gmail.com> wrote:

> Hi

> I've been a web developer for many years, but haven't really done much
> with Google Maps yet, so please be gentle...

> I want to have a world map where people click on a country to select
> it. It should either update a form field with the country name or
> redirect to that countries section of the site. Basically, this is to
> replace the conventional country select list (which I'll also have for
> people who prefer that).

> Is this possible? I just want to select a country.

I am doing it for US states:

    www.polyarc.us/polybuilder

but it could be done for world countries.  I requires a bit of work to
build the "click" / "rollover" grid.

If you are using it strictly for navigation to another web page,
static maps are much faster than dynamic maps.  "usemap" MAPs with
AREAs are another option.  You will have to convert from Lat/Lon
coordinates to pixel offsets.  If you choose not to load the whole API
just to capture one click, you can use the following:

    www.polyarc.us/adjust.js

to do the Mercator projection conversions.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
duncs  
View profile  
 More options Sep 2 2008, 11:11 am
From: duncs <duncan.aus...@gmail.com>
Date: Tue, 2 Sep 2008 08:11:34 -0700 (PDT)
Local: Tues, Sep 2 2008 11:11 am
Subject: Re: Country select

> I am doing it for US states:

>    www.polyarc.us/polybuilder

> but it could be done for world countries.  I requires a bit of work to
> build the "click" / "rollover" grid.

Thanks, this is what I'm looking for. Time to dive into the API docs!

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Andy R  
View profile  
 More options Sep 2 2008, 11:42 am
From: Andy R <andy.ros...@bluewin.ch>
Date: Tue, 2 Sep 2008 08:42:25 -0700 (PDT)
Local: Tues, Sep 2 2008 11:42 am
Subject: Re: Country select
Maybe geonames webservices can help you.

Example: Mouseclick on lat=47.03 lng=10.2:
1. call:
http://ws.geonames.org/countryCode?lat=47.03&lng=10.2&style=full&type...
 -> returns country code 'AT'
2. call:
http://ws.geonames.org/countryInfo?country=AT&style=full
-> Output XML:
<geonames>
<country>
<countryCode>AT</countryCode>
<countryName>Austria</countryName>
<isoNumeric>40</isoNumeric>
<isoAlpha3>AUT</isoAlpha3>
<fipsCode>AU</fipsCode>
<continent>EU</continent>
<capital>Vienna</capital>
<areaInSqKm>83858.0</areaInSqKm>
<population>8205000</population>
<currencyCode>EUR</currencyCode>
<languages>de-AT,hr,hu,sl</languages>
<geonameId>2782113</geonameId>
<bBoxWest>9.53591442108154</bBoxWest>
<bBoxNorth>49.0170631408691</bBoxNorth>
<bBoxEast>17.1627254486084</bBoxEast>
<bBoxSouth>46.3780250549316</bBoxSouth>
</country>
</geonames>

On 2 Sep., 15:40, duncs <duncan.aus...@gmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bratliff  
View profile  
 More options Sep 2 2008, 11:44 am
From: bratliff <bratl...@umich.edu>
Date: Tue, 2 Sep 2008 08:44:08 -0700 (PDT)
Local: Tues, Sep 2 2008 11:44 am
Subject: Re: Country select
On Sep 2, 3:11 pm, duncs <duncan.aus...@gmail.com> wrote:

> > I am doing it for US states:

> >    www.polyarc.us/polybuilder

> > but it could be done for world countries.  I requires a bit of work to
> > build the "click" / "rollover" grid.

> Thanks, this is what I'm looking for. Time to dive into the API docs!

The API docs will show you how to do it with one poly per country with
separate "click" / "mouseover" / "mouseout" event listeners for every
poly.  With one hundred plus countries, the performance will be not be
great.  For simple navigation to another web page, the 200KB API has
too much stuff you will never use.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bratliff  
View profile  
 More options Sep 2 2008, 12:44 pm
From: bratliff <bratl...@umich.edu>
Date: Tue, 2 Sep 2008 09:44:27 -0700 (PDT)
Local: Tues, Sep 2 2008 12:44 pm
Subject: Re: Country select
P.S.

The following could be adapted to do simple navigation:

    www.polyarc.us/static

using static maps rather than dynamic maps.  You do not have to load
the whole API just to capture one click.

You could call

    www.geonames.org

with Lat/Lon coordinates to obtain country ID.  I suggest using JSON
rather than XML to avoid cross-domain security issues & proxy
requirements.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marcelo  
View profile  
 More options Sep 2 2008, 1:30 pm
From: marcelo <marcelo...@hotmail.com>
Date: Tue, 2 Sep 2008 10:30:45 -0700 (PDT)
Local: Tues, Sep 2 2008 1:30 pm
Subject: Re: Country select
On Sep 2, 5:44 pm, bratliff <bratl...@umich.edu> wrote:

> The API docs will show you how to do it with one poly per country with
> separate "click" / "mouseover" / "mouseout" event listeners for every
> poly.  With one hundred plus countries, the performance will be not be
> great.

There are 3400+ counties in the US, and I don't think performance of
my map is a problem. And there's only one event listener, (map click).
The docs, (at least the reference), show you what's available, not how
to use it. That's up to you. :-)

--
Marcelo - http://maps.forum.nu
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bratliff  
View profile  
 More options Sep 2 2008, 2:00 pm
From: bratliff <bratl...@umich.edu>
Date: Tue, 2 Sep 2008 11:00:16 -0700 (PDT)
Local: Tues, Sep 2 2008 2:00 pm
Subject: Re: Country select
On Sep 2, 5:30 pm, marcelo <marcelo...@hotmail.com> wrote:

> On Sep 2, 5:44 pm, bratliff <bratl...@umich.edu> wrote:

> > The API docs will show you how to do it with one poly per country with
> > separate "click" / "mouseover" / "mouseout" event listeners for every
> > poly.  With one hundred plus countries, the performance will be not be
> > great.

> There are 3400+ counties in the US, and I don't think performance of
> my map is a problem. And there's only one event listener, (map click).
> The docs, (at least the reference), show you what's available, not how
> to use it. That's up to you. :-)

> --
> Marcelo -http://maps.forum.nu
> --

But you do agree loading the entire 200KB API just to capture one
click to send a person to another web page is overkill - right ?

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Limit longitude and latitude search to UK only" by Paul Steven
Paul Steven  
View profile  
 More options Sep 2 2008, 1:59 pm
From: "Paul Steven" <paul_ste...@btinternet.com>
Date: Tue, 2 Sep 2008 18:59:55 +0100
Local: Tues, Sep 2 2008 1:59 pm
Subject: Limit longitude and latitude search to UK only
I thought my longitude / latitude search was being limited to the UK only by
using the following line of code

define("MAPS_HOST", "maps.google.co.uk");

However if I search for wellington, it is returning the longitude and
latitude for Wellington in New Zealand.

Here is a snippit of my code to get the longitude and latitude: Any ideas
how to limit it to UK only?

$location = $_POST['location'];
$radius_search_unit = "miles";

// Initialize delay in geocode speed
$delay = 0;
$base_url = "http://" . MAPS_HOST . "/maps/geo?output=csv&key=" . KEY;

$geocode_pending = true;

while ($geocode_pending) {                                      

$request_url = $base_url . "&q=" . urlencode($location);

$csv = file_get_contents($request_url) or die("url not loading");

$csvSplit = split(",", $csv);
$status = $csvSplit[0];

$lat = $csvSplit[2];
$lng = $csvSplit[3];


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Discussion subject changed to "Country select" by marcelo
marcelo  
View profile  
 More options Sep 2 2008, 2:26 pm
From: marcelo <marcelo...@hotmail.com>
Date: Tue, 2 Sep 2008 11:26:18 -0700 (PDT)
Local: Tues, Sep 2 2008 2:26 pm
Subject: Re: Country select
On Sep 2, 8:00 pm, bratliff <bratl...@umich.edu> wrote:

> But you do agree loading the entire 200KB API just to capture one
> click to send a person to another web page is overkill - right ?

I know that this is something you've mentioned several times, and in a
few cases it may be a issue, but with current availability of 20 Mbs
ADSL connections to any domestic user, I don't see it as a problem.
Even with 2 Mbs, the entire API, plus tiles, loads in just a couple of
seconds.

In the case of my map, (linked above), I do more than just register
one click, so I guess I need those 200 Kb.

--
Marcelo -http://maps.forum.nu
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bratliff  
View profile  
 More options Sep 2 2008, 2:50 pm
From: bratliff <bratl...@umich.edu>
Date: Tue, 2 Sep 2008 11:50:08 -0700 (PDT)
Local: Tues, Sep 2 2008 2:50 pm
Subject: Re: Country select
On Sep 2, 6:26 pm, marcelo <marcelo...@hotmail.com> wrote:

In the boondocks of northern Michigan - no cable - no DSL - no water -
no sewer - no natural gas - just electricity & phone line.

 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
boomerbubba  
View profile  
 More options Sep 2 2008, 2:54 pm
From: boomerbubba <rossev...@austin.rr.com>
Date: Tue, 2 Sep 2008 11:54:36 -0700 (PDT)
Local: Tues, Sep 2 2008 2:54 pm
Subject: Re: Country select
Hey marcelo,

Cool site http://maps.forum.nu/gm_main.html to get the county info.

FWIW, the area data you display for counties does not match the facts
in the Wikipedia links.

For example, for Travis County TX (click on Austin) your site says
"911.59 mi^2."  But the Wikipedia article says:  "According to the
U.S. Census Bureau, the county has a total area of 1,022 square miles
(2,647 km²). 989 square miles (2,562 km²) are land and 33 square miles
(85 km²) (3.21%) are water."

Similar discriepancies are found for other counties that I spot-
checked.

On Sep 2, 1:26 pm, marcelo <marcelo...@hotmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marcelo  
View profile  
 More options Sep 2 2008, 3:05 pm
From: marcelo <marcelo...@hotmail.com>
Date: Tue, 2 Sep 2008 12:05:39 -0700 (PDT)
Local: Tues, Sep 2 2008 3:05 pm
Subject: Re: Country select
On Sep 2, 8:54 pm, boomerbubba <rossev...@austin.rr.com> wrote:

> Cool sitehttp://maps.forum.nu/gm_main.htmlto get the county info.

> FWIW, the area data you display for counties does not match the facts
> in the Wikipedia links.

Thanks for your comments!
At the time I got the data, (which came from the US Census Bureau), I
remember that there was a warning that the area and perimeter values
might not be accurate, but since the map is merely an "experiment" I
decided to keep it as it was.

--
Marcelo - http://maps.forum.nu
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marcelo  
View profile  
 More options Sep 2 2008, 3:20 pm
From: marcelo <marcelo...@hotmail.com>
Date: Tue, 2 Sep 2008 12:20:42 -0700 (PDT)
Local: Tues, Sep 2 2008 3:20 pm
Subject: Re: Country select
On Sep 2, 8:50 pm, bratliff <bratl...@umich.edu> wrote:

> In the boondocks of northern Michigan - no cable - no DSL - no water -
> no sewer - no natural gas - just electricity & phone line.

OK, now I understand why you complain so much about the 200 Kb. :-)
I had always thought that the US were fully covered by modern
amenities, but maybe I haven't seen enough of it.

BTW, apologies to the original poster, as we seem to have hijacked the
thread. :-(

--
Marcelo - http://maps.forum.nu
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bratliff  
View profile  
 More options Sep 2 2008, 3:40 pm
From: bratliff <bratl...@umich.edu>
Date: Tue, 2 Sep 2008 12:40:17 -0700 (PDT)
Local: Tues, Sep 2 2008 3:40 pm
Subject: Re: Country select

On Sep 2, 7:20 pm, marcelo <marcelo...@hotmail.com> wrote:

It's a tradeoff - watch the Chicago to Mackinaw race from the front
porch or fight city traffic.  It is not completely without amenities,
just beyond the 15,000 foot limit for DSL.  Believe me, I have
inquired.

I am using the same Census Department cartographic boundary files you
are using.  With the exception of one county added to Colorado since
2000, I am not aware of any discrepencies.  Wikipedia allows anyone to
edit it.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marcelo  
View profile  
 More options Sep 2 2008, 3:57 pm
From: marcelo <marcelo...@hotmail.com>
Date: Tue, 2 Sep 2008 12:57:32 -0700 (PDT)
Local: Tues, Sep 2 2008 3:57 pm
Subject: Re: Country select
On Sep 2, 9:40 pm, bratliff <bratl...@umich.edu> wrote:

> I am using the same Census Department cartographic boundary files you
> are using.  With the exception of one county added to Colorado since
> 2000, I am not aware of any discrepencies.  Wikipedia allows anyone to
> edit it.

I think this is what I remembered about inaccuracies:

From:
http://www.census.gov/geo/www/cob/shape_info.html

"Please note: The first four fields - Area, Perimeter,
xxnn_d00_, xxnn_d00_I are produced as a by-product of
the cartographic boundary file creation process, and
have no meaning for public data users, therefore,
ignore or delete these fields."

and from:
http://www.census.gov/geo/www/cob/scale.html

"The cartographic boundary files are a generalized
extract from the U.S. Census Bureau's TIGER database.
Line simplification/smoothing was performed with a
tolerance of 0.005 decimal degrees and a coordinate
reduction using the Douglas-Peucker method with a
tolerance of 0.0003 decimal degrees. Very small
polygons were eliminated when the combination
of geographic codes existed elsewhere."

So, discrepancies are no surprise.

--
Marcelo - http://maps.forum.nu
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
boomerbubba  
View profile  
 More options Sep 2 2008, 8:56 pm
From: boomerbubba <rossev...@austin.rr.com>
Date: Tue, 2 Sep 2008 17:56:59 -0700 (PDT)
Local: Tues, Sep 2 2008 8:56 pm
Subject: Re: Country select
On Sep 2, 2:57 pm, marcelo <marcelo...@hotmail.com> wrote:

> I think this is what I remembered about inaccuracies:

> From:http://www.census.gov/geo/www/cob/shape_info.html

> "Please note: The first four fields - Area, Perimeter,
> xxnn_d00_, xxnn_d00_I are produced as a by-product of
> the cartographic boundary file creation process, and
> have no meaning for public data users, therefore,
> ignore or delete these fields."

When I look at the actual contents of the Area column referenced there
(in a downloaded sample shapefile), the value is a small decimal
fraction that is not remotely close the number your site reports as
square miles.  (I can't even tell what the units are supposed to be in
the Census Area column.)  So somewhere along the line, someone may
have done some conversion math.

The actual polygons in the shapefile, when measured empirically by my
GIS program (I use Manifold) correspond quite closely to the numbers
reported on Wikipedia and attributed to Census as the total area for
each county.  And the Census American Fact Finder site reports the
same numbers.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
marcelo  
View profile  
 More options Sep 3 2008, 12:08 am
From: marcelo <marcelo...@hotmail.com>
Date: Tue, 2 Sep 2008 21:08:04 -0700 (PDT)
Local: Wed, Sep 3 2008 12:08 am
Subject: Re: Country select
On Sep 3, 2:56 am, boomerbubba <rossev...@austin.rr.com> wrote:

> When I look at the actual contents of the Area column referenced there
> (in a downloaded sample shapefile), the value is a small decimal
> fraction that is not remotely close the number your site reports as
> square miles.  (I can't even tell what the units are supposed to be in
> the Census Area column.)  So somewhere along the line, someone may
> have done some conversion math.

Yes, at the time I created that mashup, I just found some factor by
trial and error, and multiplied that small fractional number with it.
As I said before, it's not mission critical, so I'm happy with it as
it is.

--
Marcelo - http://maps.forum.nu
--


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
DynGeometry  
View profile  
 More options Sep 3 2008, 4:48 pm
From: DynGeometry <dyngeome...@gmail.com>
Date: Wed, 3 Sep 2008 13:48:38 -0700 (PDT)
Local: Wed, Sep 3 2008 4:48 pm
Subject: Re: Country select
Just let you know this website can display zip, city, school district
and census track for USA also.
http://dyngeometry.webhop.net/WebServiceClient/XYQuery.aspx

On Sep 2, 11:08 pm, marcelo <marcelo...@hotmail.com> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
bratliff  
View profile  
 More options Sep 3 2008, 6:44 pm
From: bratliff <bratl...@umich.edu>
Date: Wed, 3 Sep 2008 15:44:58 -0700 (PDT)
Local: Wed, Sep 3 2008 6:44 pm
Subject: Re: Country select
On Sep 3, 8:48 pm, DynGeometry <dyngeome...@gmail.com> wrote:

> Just let you know this website can display zip, city, school district
> and census track for USA also.http://dyngeometry.webhop.net/WebServiceClient/XYQuery.aspx

He is looking for WORLD COUNTRY polys, not overpriced public domain US
Census Department cartographic boundary files with no JSON interface.

www.geonames.org is FREE.  It has a JSON interface.  It can geocode
WORLD COUNTRIES.

It is a discussion forum, not a sales forum.


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »