Hi Paulo,
You could probably create a layer as you propose but you might want to
consider using InfoBoxes (developed by Gary Little). Put the latitude
and longitude for features that you want to label (e.g., cities,
counties, any type of points) in a JSON file that also includes the
names then use the JSON file to populate the labels. In this example:
http://ny.zgroks.com I have labeled the 62 Counties in New York State.
These labels use an invisible marker as an anchor. This allows the
user to move the labels after they're generated (say, if you want to
print the screen).
If you 'view source' in the example you can see how the JSON file is
laid out, and how to include the InfoBox. It's probably not the best
solution but it's fairly easy to set up.
Regards,
Bob
On Jun 10, 2:15 pm, pkuong <
paulo.ku...@gmail.com> wrote:
> I've been trying to find a way to put the city labels above the
> google's polygon. So I was thinking that may be I can somehow create a
> layer of labels and put that layer on top of the polygon's pane (which
> is "OverlayLayer")
>
> But the problem is, the only way I can get that "label layer" so far
> is through using the following code to get the tiles:
>
> var labelTiles = {
> getTileUrl: function(coord, zoom) {
> $("#tile").val("x:"+coord.x+" y:"+coord.y+" z:"+zoom);
> return "http://[somepublic tile server]/"+zoom+"/"+coord.x