Barry,
Thanks for the response. I have tried numerous KML alterations to my
NetworkLink and the resulting KML document from the NetworkLink URL,
but to no avail. Maybe I just have an odd scenario. Essentially, I
have a NetworkLink and when the URL is called the first time by GE, I
add a Placemark where I do want to do the fly to. On all subsequent
URL calls by GE, I have other Placemarkers and do NOT want the fly to
to occur. Here is my NetworkLink:
<NetworkLink>
<name>Data Layers Name</name>
<flyToView>1</flyToView>
<Link>
<href>
http://www.myserver.com/myservlet<href>
<viewRefreshMode>onRequest</viewRefreshMode>
<viewFormat>BBOX=[bboxWest],[bboxSouth],[bboxEast],
[bboxNorth];CAMERA=[lookatLon],[lookatLat],[lookatRange]</viewFormat>
</Link>
</NetworkLink>
Having the <flyToView> as defined above has GE do a fly to each time
the NetworkLink URL is called.
Now, since I only want the fly to to happen after the first URL call
by GE, I took out the <flyToView> tag in the NetworkLink defined above
and tried several variations of KML returned by the server to try to
get GE to fly to the Placemarker in the KML document that gets
returned from the server (first call only). Here are some KML
variations:
1)
<Document>
<flyToView>1</flyToView>
<Placemark>........</Placemark>
</Document>
2)
<Document>
<LookAt>
<longitude>20.506021</longitude>
<latitude>41.293526</latitude>
</LookAt>
<flyToView>1</flyToView>
<Placemark>......</Placemark>
</Document>
3)
<Document>
<NetworkLinkControl>
<LookAt>
<longitude>20.506021</longitude>
<latitude>41.293526</latitude>
</LookAt>
<flyToView>1</flyToView>
<NetworkLinkControl>
<Placemark>........<Placemark>
</Document>
The above examples are for the KML that gets returned by the first GE
call to the NetworkLink URL. All subsequent calls via a "refresh"
just add Placemarks.
None of the above examples gets GE to do a fly to on the Placemark.
The KML API states the following for a <flyToView> element:
"A value of 1 causes Google Earth to fly to the view of the root
element in the refreshed file. In this case, Google Earth flies to the
<LookAt> view of the parent Document, not the <LookAt> of the
Placemarks contained within the Document."
I guess I must be confused as to what this really means. Maybe the
<flyToView> is suppose to be in the NetworkLink definition as is
listed at the top of this response and that once it is set, then that
is it. It is either always set (1) or never set (0).
Do have any further thoughts on this situation? Hopefully I explained
it clearly.
Thanks again - Peter
On Nov 18, 8:16 am, barryhunter [KML Guru] wrote:
> I dont think GE does that by default, at least I have view based
> refreshes[1] that dont auto zoom each time they load,
>
> Check you don't have FlyToView set:
http://code.google.com/apis/kml/documentation/kml_tags_beta1.html#fly...
>
> [1] Seehttp://
www.nearby.org.uk/google.htmleg number 4 or 7
>
> On Nov 17, 7:40 pm, PLen wrote:
>
>
>
> > Hello,
>
> > It seems that by default, GE will autozoom the map to fit new markers
> > that my KML places on the map. For example, I have NetworkLink that
> > will add new placemarkers. Once GE places the markers on the map, it
> > will auto zoom the map so that all of the markers fit nicely within
> > the view port.
>
> > My question is how can I prevent GE from doing the auto zoom? The
> > reason I ask is the following. I have a NetworkLink that has a
> > viewRefreshMode of onStop. Now, when the initial NetworkLink call is
> > made, I send up KML for markers within some area of the viewport.
> > When GE places the markers, it auto zooms. That auto zoom moves the
> > map which then triggers the next NetworkLink call when the map stops
> > moving. I then place another marker(s) and GE does another auto zoom,
> > which then again triggers another NetworkLink call. So in the end, I,
> > as a user, never had to touch my mouse. GE essentially created its
> > own endless loop of calling my NetworkLink simply because it moved the
> > map with its auto zoom. Even after the zoom is as far in as it will
> > go, the NetworkLink continues to get called every 3 seconds.
>
> > There must be a way in the KML that I return from a NetworkLink call,
> > that will simply allow me to place my markers and not have GE do its
> > auto-zoom.
>
> > Thoughts? - Peter- Hide quoted text -
>
> - Show quoted text -