Layer for everything exept one country?

23 views
Skip to first unread message

OscarWilde

unread,
Dec 5, 2011, 6:55:48 AM12/5/11
to Google Maps JavaScript API v3
Hi all,

I want to "hightlight" the visitors country by building a layer for
everthing exept his own country. How can I do that?

Thanks for your help!

Frank

giscoda

unread,
Dec 6, 2011, 5:15:40 AM12/6/11
to Google Maps JavaScript API v3
Hi,

not sure whether a simple KML would be an option. If kml can handle
holes within polygons!?
I did it using an image overlay. You can find a working example here:
http://karte.immobilien-kompass.de

Regards
-s.

Marcelo

unread,
Dec 6, 2011, 8:59:10 AM12/6/11
to Google Maps JavaScript API v3
You can do it with custom tiles, like this:
http://maps.forum.nu/gm_texas.html

but to do so on the visitors country you'd have to build a tile set
for every country in the world and subscribe to an IP-to-location
service in order to determine which tile set to load.

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

Vasile Cotovanu

unread,
Dec 6, 2011, 2:10:01 PM12/6/11
to google-map...@googlegroups.com
Hello Frank,

On Monday, December 5, 2011 12:55:48 PM UTC+1, OscarWilde wrote:

I want to "hightlight" the visitors country by building a layer for
everthing exept his own country. How can I do that?

Try this XSL script https://github.com/vasile/Mask-KML-polygons
You can see it in action here http://bit.ly/mwBBu1

Vasile

Reply all
Reply to author
Forward
0 new messages