Point issue in KmlLayer

76 views
Skip to first unread message

Patrick Cain

unread,
Sep 8, 2010, 2:28:38 PM9/8/10
to Google Maps JavaScript API v3
Hello, all -

There's an odd issue with this map: http://www.patrickcain.ca/maps/100902_counciltest.html

The points are 32x32 transparent .png files made in Photoshop, with a
number in white. The further out the map is zoomed, the more appear in
the Google default point shape instead of as numbers. From zoom 13 and
closer, they all appear as numbers. As far as I can see this isn't a
crowding issue, since there doesn't seem to be a relationship between
how close the points are to each other and whether they appear as
numbers.

It's not an issue with the KML, since it appears correctly in some
zooms. (The KML all appears correct in Google Earth.)

Grok Lobster

unread,
Sep 8, 2010, 4:54:21 PM9/8/10
to Google Maps JavaScript API v3
I don't see any numbers at all.

Nathan Raley

unread,
Sep 8, 2010, 5:01:41 PM9/8/10
to google-map...@googlegroups.com
He's talking about the numbers labeling the sections, and yes, I see it as well.


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScript API v3" group.
To post to this group, send email to google-map...@googlegroups.com.
To unsubscribe from this group, send email to google-maps-js-a...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/google-maps-js-api-v3?hl=en.


Patrick Cain

unread,
Sep 8, 2010, 5:55:59 PM9/8/10
to Google Maps JavaScript API v3
I don't see them now either.

geoco...@gmail.com

unread,
Sep 8, 2010, 6:21:23 PM9/8/10
to Google Maps JavaScript API v3
On Sep 8, 2:55 pm, Patrick Cain <pemc...@gmail.com> wrote:
> I don't see them now either.

There seems to be a general issue with the serverside processing for
KmlLayers:
http://groups.google.com/group/google-maps-js-api-v3/browse_frm/thread/c44c14fb1f409d2f#

-- Larry

Patrick Cain

unread,
Sep 8, 2010, 7:06:55 PM9/8/10
to Google Maps JavaScript API v3
Thanks, Larry - you've saved me any more wasted time trying to fix it
on my end. :-)

On Sep 8, 6:21 pm, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:
> On Sep 8, 2:55 pm, Patrick Cain <pemc...@gmail.com> wrote:
>
> > I don't see them now either.
>
> There seems to be a general issue with the serverside processing for
> KmlLayers:http://groups.google.com/group/google-maps-js-api-v3/browse_frm/threa...
>
>   -- Larry

Luke Mahé

unread,
Sep 8, 2010, 7:38:03 PM9/8/10
to google-map...@googlegroups.com
We're looking in this.

-- Luke


>
>   -- Larry

Joseph Elfelt

unread,
Sep 8, 2010, 7:49:25 PM9/8/10
to Google Maps JavaScript API v3
Yikes! Who swiped my markers?? This iframe map is supposed to have
some.
http://www.mappingsupport.com/p/gmap4.html

Luke Mahé

unread,
Sep 8, 2010, 11:07:10 PM9/8/10
to google-map...@googlegroups.com
Hey guys,

This is working again.

-- Luke



--

Joseph Elfelt

unread,
Sep 8, 2010, 11:20:49 PM9/8/10
to Google Maps JavaScript API v3
Yup, works for me now

Patrick Cain

unread,
Sep 9, 2010, 11:18:21 AM9/9/10
to Google Maps JavaScript API v3
Excellent.

I'd like to go back to my original question, then - trying different
zooms, why is there an issue with these markers? I've never seen
anything quite like this.

Rossko

unread,
Sep 9, 2010, 3:33:50 PM9/9/10
to Google Maps JavaScript API v3
> I'd like to go back to my original question, then  - trying different
> zooms, why is there an issue with these markers? I've never seen
> anything quite like this.

I cannot now find it, but there was a very similar recent post. The
crux of the matter is that when you use kmlLayer, it is rendered as
tile images at google's servers. There appears to be a limit to how
many different icon images can be rendered on one tile. As you zoom
out and more placemarks crowd onto one tile area, you breach the limit
and get default blue lollipops for the 'excess' icons.

Circumventions :

don't use kmlLayer, there are alternatives like GGeoXml3 (with
performance tradeoffs)
or
don't use placemarks as labels, consider a <GroundOverlay>
or
don't use KML, render the data directly in the API as custom polys and
labels or markers
or
some hybrid solution

Ben Appleton

unread,
Sep 10, 2010, 4:01:26 AM9/10/10
to google-map...@googlegroups.com

The KML renderer only fetches approximately 8 icons per KML file, to avoid overloading servers we don't control.  If you embed the icons inside your KMZ you can render many more.

On 10 Sep 2010 05:34, "Rossko" <ros...@culzean.clara.co.uk> wrote:

> I'd like to go back to my original question, then  - trying different

> zooms, why is there an iss...

I cannot now find it, but there was a very similar recent post.  The
crux of the matter is that when you use kmlLayer, it is rendered as
tile images at google's servers.  There appears to be a limit to how
many different icon images can be rendered on one tile.  As you zoom
out and more placemarks crowd onto one tile area, you breach the limit
and get default blue lollipops for the 'excess' icons.

Circumventions :

don't use kmlLayer, there are alternatives like GGeoXml3 (with
performance tradeoffs)
or
don't use placemarks as labels, consider a <GroundOverlay>
or
don't use KML, render the data directly in the API as custom polys and
labels or markers
or
some hybrid solution


--
You received this message because you are subscribed to the Google Groups "Google Maps JavaScri...

Patrick Cain

unread,
Sep 10, 2010, 9:20:02 AM9/10/10
to Google Maps JavaScript API v3


On Sep 10, 4:01 am, Ben Appleton <apple...@google.com> wrote:
> .  If you embed the icons inside your
> KMZ you can render many more.

If we're using the same terminology, that's what I'm doing here: 44
polys and 44 icons share the same .kmz file.

Rossko

unread,
Sep 10, 2010, 11:07:35 AM9/10/10
to Google Maps JavaScript API v3
> If we're using the same terminology, that's what I'm doing here: 44
> polys and 44 icons share the same .kmz file.

Don't think so ; the KML within your KMZ contains <href>s to external
icon images.
I think Ben meant for the KMZ to be a self-contained 'package' in the
usual way, containing the image files themselves and the <href> using
relative urls

Patrick Cain

unread,
Sep 10, 2010, 11:15:19 AM9/10/10
to Google Maps JavaScript API v3
Can you point to an example?

Grok Lobster

unread,
Sep 10, 2010, 11:34:33 AM9/10/10
to Google Maps JavaScript API v3
The standard is to have a doc.kml file and one or more folders for
images, icons, etc.
The href becomes "icons/myIcon1.png" ...
Zip them together and rename as .kmz
> > relative urls- Hide quoted text -
>
> - Show quoted text -

Rossko

unread,
Sep 10, 2010, 1:44:06 PM9/10/10
to Google Maps JavaScript API v3

Patrick Cain

unread,
Sep 14, 2010, 6:18:19 PM9/14/10
to Google Maps JavaScript API v3
If that was true, the points would be more likely to fail in high-
density areas. What I see is the reverse.

Rossko

unread,
Sep 14, 2010, 9:05:37 PM9/14/10
to Google Maps JavaScript API v3
> If that was true, the points would be more likely to fail in high-
> density areas. What I see is the reverse.

Yep, I remembered the details wrong. Did you see what Ben posted?

Patrick Cain

unread,
Sep 14, 2010, 9:38:16 PM9/14/10
to Google Maps JavaScript API v3

Yes.

I'd appreciate it if somebody has the time to look at
http://www.patrickcain.ca/maps/100914_council_newtest.html which uses
some ideas from his post. In that version the polys are in the KML,
and the custom markers are in the HTML map file itself. The custom
markers aren't appearing, which I think probably has something to do
with my not knowing much about Java; apologies.

I'm used to doing maps in KmlLayer.

Rossko

unread,
Sep 15, 2010, 5:10:46 AM9/15/10
to Google Maps JavaScript API v3
> http://www.patrickcain.ca/maps/100914_council_newtest.html
> some ideas from his post. In that version the polys are in the KML,
> and the custom markers are in the HTML map file itself. The custom
> markers aren't appearing, which I think probably has something to do
> with my not knowing much about Java; apologies.

That doesn't matter, this is javascript - they are different.

It's a timing issue ; your map is created in a (delayed) function
initialize() but your markers are created in inline script - before
the map exists, so they cannot be placed on it.
You might bundle up your marker creation script in another function
and call that one at the end of initialize()
Reply all
Reply to author
Forward
0 new messages