Issues with zoom: true in geoxml3, other geoxml3 qs

226 views
Skip to first unread message

alexis

unread,
Jan 24, 2011, 1:07:01 PM1/24/11
to Google Maps JavaScript API v3
Hi all,

I am new to geoxml3 and have two questions I was hoping to get some
help with.

1. What is the expected behavior for setting the zoom:true option on
the parser?

In this simple sample I have up, I load a tiny kml file (http://
www.geochemie.uni-bremen.de/kml/kml.html) and set the zoom:true
option. However, it seems to zoom all the way in to the closest
setting! Is that expected behavior?

See the sample at: http://alexisgo.com/maps/index.html

2. Is geoxml3 ok to use for mobile?

I am trying to use quite a large data set (http://www.nyc.gov/html/
dot//downloads/misc/cityracks.kml). I am able to slowly get the full
data set to load in the browser, but when I test it in mobile Safari
using Dashcode, it always times out.

Some background/context:
The reason I wanted to use geoxml3 is to try and approximate what is
going on here, but for mobile (see bike map):
http://www.nyc.gov/html/dot/html/bicyclists/cityracks.html.

What is great about what they've done already is that they've used
clustering to solve the "too many markers" problem, I believe in
reading through it, they are doing so using a custom js,
http://www.nyc.gov/html/dot/includes/scripts/bikeracks_clusterer2.jsm

The problem is, much of their code uses v2 of the maps API, and I
figured why not update it. Am experimenting bit by bit to figure out
how best to cluster such a big dataset in v3 with a kml file as my
source... KmlLayer works great, but there are too many markers.
Loading the data set with geoxml3 on mobile causes a time out.

Anyway, any help with questions 1 & 2 would be much appreciated!

Alexis

geoco...@gmail.com

unread,
Jan 24, 2011, 3:13:00 PM1/24/11
to Google Maps JavaScript API v3
On Jan 24, 10:07 am, alexis <alexisgol...@gmail.com> wrote:
> Hi all,
>
> I am new to geoxml3 and have two questions I was hoping to get some
> help with.
>
> 1. What is the expected behavior for setting the zoom:true option on
> the parser?
>
> In this simple sample I have up, I load a tiny kml file (http://www.geochemie.uni-bremen.de/kml/kml.html) and set
> the zoom:true option. However, it seems to zoom all the way in to the closest
> setting! Is that expected behavior?
>
> See the sample at:http://alexisgo.com/maps/index.html

It should zoom to display the contents of the kml file. I don't see
an example that uses geoxml3 at either of those two urls.

>
> 2. Is geoxml3 ok to use for mobile?
>
> I am trying to use quite a large data set (http://www.nyc.gov/html/
> dot//downloads/misc/cityracks.kml). I am able to slowly get the full
> data set to load in the browser, but when I test it in mobile Safari
> using Dashcode, it always times out.

1.75 MB is a little large for a mobile browser. You might want to
make it smaller (so you could use KmlLayer).

-- Larry

>
> Some background/context:
> The reason I wanted to use geoxml3 is to try and approximate what is
> going on here, but for mobile (see bike map):http://www.nyc.gov/html/dot/html/bicyclists/cityracks.html.
>
> What is great about what they've done already is that they've used
> clustering to solve the "too many markers" problem, I believe in
> reading through it, they are doing so using a custom js,http://www.nyc.gov/html/dot/includes/scripts/bikeracks_clusterer2.jsm

alexis

unread,
Jan 24, 2011, 3:27:31 PM1/24/11
to Google Maps JavaScript API v3
Hi again,

Specifically, the file using geoxml3 is http://alexisgo.com/maps/main.js,
which is included in the head section of the http://alexisgo.com/maps/index.html.

Larry, thanks for your suggestion re #2.

I'm thinking my best bet is to limit loading the kml that is within a
specified viewport, as described here:
http://code.google.com/apis/maps/articles/toomanymarkers.html#viewportmarkermanagement.
What do you think?

Are there good samples/examples people would recommend I look at that
use Viewport Marker Management?

Thanks again,
Alexis

On Jan 24, 3:13 pm, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:

geoco...@gmail.com

unread,
Jan 24, 2011, 3:27:49 PM1/24/11
to Google Maps JavaScript API v3
On Jan 24, 12:13 pm, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:
> On Jan 24, 10:07 am, alexis <alexisgol...@gmail.com> wrote:
>
> > Hi all,
>
> > I am new to geoxml3 and have two questions I was hoping to get some
> > help with.
>
> > 1. What is the expected behavior for setting the zoom:true option on
> > the parser?
>
> > In this simple sample I have up, I load a tiny kml file (http://www.geochemie.uni-bremen.de/kml/kml.html) and set
> > the zoom:true option. However, it seems to zoom all the way in to the closest
> > setting! Is that expected behavior?
>
> > See the sample at:http://alexisgo.com/maps/index.html
>
> It should zoom to display the contents of the kml file.  I don't see
> an example that uses geoxml3 at either of those two urls.

I found your map at the second url, but it doesn't work in IE6. Look
like you are using an old version of geoxml3 (from the trunk), the
latest version is in the polys branch.

-- Larry

>
>
>
> > 2. Is geoxml3 ok to use for mobile?
>
> > I am trying to use quite a large data set (http://www.nyc.gov/html/
> > dot//downloads/misc/cityracks.kml). I am able to slowly get the full
> > data set to load in the browser, but when I test it in mobile Safari
> > using Dashcode, it always times out.
>
> 1.75 MB is a little large for a mobile browser.  You might want to
> make it smaller (so you could use KmlLayer).
>
>   -- Larry
>
>
>
>
>
> > Some background/context:
> > The reason I wanted to use geoxml3 is to try and approximate what is
> > going on here, but for mobile (see bike map):http://www.nyc.gov/html/dot/html/bicyclists/cityracks.html.
>
> > What is great about what they've done already is that they've used
> > clustering to solve the "too many markers" problem, I believe in
> > reading through it, they are doing so using a custom js,http://www.nyc.gov/html/dot/includes/scripts/bikeracks_clusterer2.jsm
>
> > The problem is, much of their code uses v2 of the maps API, and I
> > figured why not update it. Am experimenting bit by bit to figure out
> > how best to cluster such a big dataset in v3 with a kml file as my
> > source... KmlLayer works great, but there are too many markers.
> > Loading the data set with geoxml3 on mobile causes a time out.
>
> > Anyway, any help with questions 1 & 2 would be much appreciated!
>
> > Alexis- Hide quoted text -
>
> - Show quoted text -

geoco...@gmail.com

unread,
Jan 24, 2011, 3:50:32 PM1/24/11
to Google Maps JavaScript API v3
On Jan 24, 12:27 pm, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:
> On Jan 24, 12:13 pm, "geocode...@gmail.com" <geocode...@gmail.com>
> wrote:
> > On Jan 24, 10:07 am, alexis <alexisgol...@gmail.com> wrote:
>
> > > Hi all,
>
> > > I am new to geoxml3 and have two questions I was hoping to get some
> > > help with.
>
> > > 1. What is the expected behavior for setting the zoom:true option on
> > > the parser?
>
> > > In this simple sample I have up, I load a tiny kml file (http://www.geochemie.uni-bremen.de/kml/kml.html) and set
> > > the zoom:true option. However, it seems to zoom all the way in to the closest
> > > setting! Is that expected behavior?
>
> > > See the sample at:http://alexisgo.com/maps/index.html
>
> > It should zoom to display the contents of the kml file.  I don't see
> > an example that uses geoxml3 at either of those two urls.
>
> I found your map at the second url, but it doesn't work in IE6.  Look
> like you are using an old version of geoxml3 (from the trunk), the
> latest version is in the polys branch.

Also, I haven't played much with kml with a single placemark (which I
think is what you are asking about, as your "myoffice.kml" file only
has one placemark in it).

It wouldn't be hard to add a default/maximum zoom for the case where
the number of placemarks is one, but I'm not sure there is a general
"right" answer for the correct zoom to use in that case.

  -- Larry

>
>
>
>
> > > 2. Is geoxml3 ok to use for mobile?
>
> > > I am trying to use quite a large data set (http://www.nyc.gov/html/
> > > dot//downloads/misc/cityracks.kml). I am able to slowly get the full
> > > data set to load in the browser, but when I test it in mobile Safari
> > > using Dashcode, it always times out.
>
> > 1.75 MB is a little large for a mobile browser.  You might want to
> > make it smaller (so you could use KmlLayer).
>
> >   -- Larry
>
> > > Some background/context:
> > > The reason I wanted to use geoxml3 is to try and approximate what is
> > > going on here, but for mobile (see bike map):http://www.nyc.gov/html/dot/html/bicyclists/cityracks.html.
>
> > > What is great about what they've done already is that they've used
> > > clustering to solve the "too many markers" problem, I believe in
> > > reading through it, they are doing so using a custom js,http://www.nyc.gov/html/dot/includes/scripts/bikeracks_clusterer2.jsm
>
> > > The problem is, much of their code uses v2 of the maps API, and I
> > > figured why not update it. Am experimenting bit by bit to figure out
> > > how best to cluster such a big dataset in v3 with a kml file as my
> > > source... KmlLayer works great, but there are too many markers.
> > > Loading the data set with geoxml3 on mobile causes a time out.
>
> > > Anyway, any help with questions 1 & 2 would be much appreciated!
>
> > > Alexis- Hide quoted text -
>
> > - Show quoted text -- Hide quoted text -
>
> - Show quoted text -- Hide quoted text -

alexis

unread,
Jan 24, 2011, 8:30:35 PM1/24/11
to Google Maps JavaScript API v3
I see, that actually makes sense. I bet that's the explanation for the
odd full-zoom I'm seeing with this simple, one-placemark example.

Thanks!

On Jan 24, 3:50 pm, "geocode...@gmail.com" <geocode...@gmail.com>
Reply all
Reply to author
Forward
0 new messages