3
votes

I am pretty new to .kml and maps and I have a project due by the end of this week. I need a little help please.

What I Used Google Map API v.3, multiple KML files, and a little .js

What I have done: I have a map of Colorado showing the boundary lines of all 64 counties with the counties being divided up into 17 kml files and each county having its own Placemark using polygon shapes. Unfortunately, I have removed the descriptions from each county placemark since I didn't need them at the time, but I can easily put them back in.

What I need: I would love (need) for the names of the counties to show up on the map directly without having to do any mouse action (clicking the layers to open the call-out bubble). So in essence when you load the map, you see the county boundaries with their corresponding county names.

Is there a way to add the county names to the Placemarks? I did see another post post OpenLayers, but I would like to find out what my options are. If anyone can guide me to my best options I would greatly appreciate it.

Here is a link to a temp map showing the counties for CO: http://www.tranquilitycea.com/work/map/map.html

~Liz

1
The KML referenced in your temp map only contains a single point, it doesn't contain the boundaries of the counties. - geocodezip
Yes, the one single point was a test for me to work with. While I actually figure your map took less time then mine did, I wonder if the shaded coloring could be removed to show only the outlines and names of the counties? - Liz
Sure. You can dynamically style FusionTablesLayers. The names of the counties can be styled with css. - geocodezip
Thank you for your time and response. I will look further into FusionTableLayers, since this is the second map work I have done for a government site. I should probably learn to get real comfortable with this Google's product. ~Liz - Liz

1 Answers

0
votes

My final solution was to create small transparent .png text images of each county name then I added them as new Marker Images and placed each on map individually. It was as creative as I could get with my limited knowledge and was done in another area than what my original post referred to.

For each county (a lovely 64 of them) this is what I did...and I still would love a better solution. :0)

var idenver = new google.maps.MarkerImage("http://tranquilitycea.com/portfolio/map/denver.png", null, null, new google.maps.Point(24,5));

var denver = new google.maps.Marker({ position: new google.maps.LatLng(39.76, -106.88),map: map,icon: idenver});

For a few items this is not a horrible idea, but I am sure there has to be a better way.

Liz

The site www.ColoradoTransportationMatters.com goes live at by the end of this week.