One of the elements I have made sure works in my version 3 kml parser
is relative icon paths

http://www.microimages.com/geodata/dealers/dyasdirectory/testwithproxy.htm

And it even works when the data path is going through a proxy script.

On Dec 7, 8:15 pm, Kelly Close <[email protected]> wrote:
> Interesting.  The code examples I've been looking at for custom icons used
> relative paths and I didn't question it.  Today, like I mentioned, the
> KML's are rendering fine, but it's a good point - I am going to try some
> fully qualified paths to see if I get more consistent results.  The
> relative paths could be making the kml processor do more work, leading to
> some latency issues.  Maybe that would explain why things work sometimes,
> work partially other times, and sometimes not at all.
>  *
>
> K. Kelly Close, P.E.
>
> Project Manager
>
> Data Integration Specialist
>
> 303-455-9589
>
>  LEONARD RICE ENGINEERS, INC.
>
> 2000 Clay St, Ste 300, Denver, CO  80211
>
> http://www.lrewater.com
>
>       *
>
> On Wed, Dec 7, 2011 at 4:38 PM, [email protected]
> <[email protected]>wrote:
>
>
>
>
>
>
>
> > On Dec 7, 10:33 am, Kelly Close <[email protected]> wrote:
> > > Thanks Larry - I appreciate it!  And magically, today all the custom
> > icons
> > > are rendering just fine.  Thank you Google!
>
> >http://www.imaginationbecomesreality.com/crwas/ColoradoModelNodes.kml
>
> > Looks to me like you don't have fully qualified paths to your icons.
> > I don't think google's kml processor looks for things without a fully
> > qualified path in the right place, so it doesn't surprise me that they
> > don't work.  I think there are enhancement requests in the issue
> > tracker to add that, but I don't know that it works now.
>
> > <Style id='diversion'>
> >  <IconStyle>
> >    <Icon><href>diversion.png</href></Icon>
> >  </IconStyle>
> >  <LabelStyle>
> >    <scale>0</scale>
> >  </LabelStyle>
> > </Style>
>
> >   -- Larry
>
> > > I made no changes to my code or where it's stored since yesterday when
> > they
> > > were all drawing as the default blue icon (with an occasional custom
> > making
> > > it through here and there).  So, my question really has changed to a
> > > request for advice.  There are always a few ways you can skin the cat, as
> > > it were, and if people have input on more or less stable approaches to
> > > storing and referencing their KML for use with the Maps API and KML code
> > > methods for using custom icons, I'd be interested in hearing it.
>
> > > And in case it's of interest, we use the KML in javascript contained in
> > > this file
> > > (valid basin parameters are 1, 2, 3, 4 and 5; page parameter can be 1 or
> > 0
> > > but won't affect what you see):
> >http://www.imaginationbecomesreality.com/crwas/gmapapi_ibr.html?basin...
> > > (the Apply button is disabled in this version)
>
> > > ~Kelly
> > > *
>
> > > K. Kelly Close, P.E.
>
> > > Project Manager
>
> > > Data Integration Specialist
>
> > > 303-455-9589
>
> > >  LEONARD RICE ENGINEERS, INC.
>
> > > 2000 Clay St, Ste 300, Denver, CO  80211
>
> > >http://www.lrewater.com
>
> > >       *
>
> > > On Tue, Dec 6, 2011 at 9:03 PM, [email protected]
> > > <[email protected]>wrote:
>
> > > > On Dec 6, 7:57 pm, Kelly Close <[email protected]> wrote:
> > > > > Sorry - that was not intended to be a clickable link - just a fake
> > > > > address to illustrate the syntax I'm using.   ~Kelly
>
> > > > If you were to post a link to your live kml feed, I might investigate
> > > > further.
>
> > > >  -- Larry
>
> > > > > On 12/6/11, [email protected] <[email protected]> wrote:
>
> > > > > > On Dec 6, 3:51 pm, Kelly Close <[email protected]> wrote:
> > > > > >> I posted this first in the V2 forum before realizing I was in the
> > > > > >> wrong place.  Sorry for the cross post!  We are using the Maps
> > API V3.
>
> > > > > >> I've had really inconsistent success getting the custom icons to
> > > > > >> display correctly in KML files that are being displayed using the
> > > > > >> Google Maps API.  Some days the icons all display perfectly (back
> > in
> > > > > >> October), and then they started to be sporadically replaced with
> > the
> > > > > >> default blue icon (early November).  Then they started working
> > again
> > > > > >> (November 22nd), but it's all blue markers again (with a very
> > > > > >> occasional and sporadic custom icon rendering).  I read some
> > threads
> > > > > >> on the My Maps forum and saw that Google has been making some code
> > > > > >> changes that could be affecting this so I just don't know what to
> > > > > >> troubleshoot!
>
> > > > > >> These are large KML files (several hundreds of points) which in
> > which
> > > > > >> I use style-sheet like references to custom icon files (see
> > example
> > > > > >> below).  The KML files are generated with code which I can
> > re-write if
> > > > > >> the style-sheet-like approach to referencing custom icons is just
> > not
> > > > > >> going to be reliable, but this would take some time and I'd like
> > to be
> > > > > >> sure it's necessary.  Is the Google Maps API supposed to reliably
> > > > > >> handle this kind of icon reference in KML's?  If not, what would
> > be
> > > > > >> the preferred way to reference custom icon files for placemarks,
> > if
> > > > > >> the KML is going to be rendered with the Google Maps API?
>
> > > > > >> Here are some details about my approach.  Should this be working?
>
> > > > > >> The custom icons are referenced by establishing Style id's at the
> > top
> > > > > >> of each KML:
> > > > > >> <Style id='diversion'>
> > > > > >>  <IconStyle>
> > > > > >>    <Icon><href>diversion.png</href></Icon>
> > > > > >>  </IconStyle>
> > > > > >>  <LabelStyle>
> > > > > >>    <scale>0</scale>
> > > > > >>  </LabelStyle>
> > > > > >> </Style>
>
> > > > > >> Each placemark references the appropriate style id:
> > > > > >> <Placemark>
> > > > > >> <name>MEEKER DEMAND</name>
> > > > > >> <description>Node ID: 950810</description>
> > > > > >> <styleUrl>#diversion</styleUrl>
> > > > > >> <Point><coordinates>-107.914918196241743,40.032954697618642</
> > > > > >> coordinates></Point>
> > > > > >> </Placemark>
>
> > > > > >> We are calling the KML's using the Google Maps API like so:
>
> > > > > >> var mapNodeSelection = new
> > > > > >> google.maps.Map(document.getElementById("map_canvas"), myOptions);
>
> > > > > >> var kmlNodeLayer = new
> > > > > >> google.maps.KmlLayer('http://www.publicwebfolder.com/Nodes.kml',
>
> > > > > > This is not a public web server, it won't work.  If it is just "an
> > > > > > example", please don't do that it just wastes time.
>
> > > > > >   -- Larry
>
> > > > > > {supressInfoWindows:false,
> > > > > >> preserveViewport: true, map: mapNodeSelection}
>
> > > > > >> And then rendering the "map_canvas" element in html with a div
> > tag.
>
> > > > > >> Thanks!  ~Kelly
>
> > > > > > --
> > > > > > 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
> > > > > > [email protected].
> > > > > > To unsubscribe from this group, send email to
> > > > > > [email protected].
> > > > > > For more options, visit this group at
> > > > > >http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> > > > > --
> > > > > Sent from my mobile device
>
> > > > >  *
>
> > > > > K. Kelly Close, P.E.
>
> > > > > Project Manager
>
> > > > > Data Integration Specialist
>
> > > > > 303-455-9589
>
> > > > >  LEONARD RICE ENGINEERS, INC.
>
> > > > > 2000 Clay St, Ste 300, Denver, CO  80211
>
> > > > >http://www.lrewater.com
>
> > > > >      *
>
> > > > --
> > > > 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
> > > > [email protected].
> > > > To unsubscribe from this group, send email to
> > > > [email protected].
> > > > For more options, visit this group at
> > > >http://groups.google.com/group/google-maps-js-api-v3?hl=en.
>
> > --
> > 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
> > [email protected].
> > To unsubscribe from this group, send email to
> > [email protected].
> > For more options, visit this group at
> >http://groups.google.com/group/google-maps-js-api-v3?hl=en.

-- 
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 [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/google-maps-js-api-v3?hl=en.

Reply via email to