Account Options

  1. Sign in
The old Google Groups will be going away soon.
Switch to the new Google Groups.
Google Groups Home
« Groups Home
"a has no properties" in GPolyline.fromEncoded
There are currently too many topics in this group that display first. To make this topic appear first, remove this option from another topic.
There was an error processing your request. Please try again.
flag
  5 messages - Collapse all  -  Translate all to Translated (View all originals)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
ConnorZ  
View profile  
 More options Jun 2 2007, 5:29 pm
From: ConnorZ <kristiankj...@gmail.com>
Date: Sat, 02 Jun 2007 14:29:15 -0700
Local: Sat, Jun 2 2007 5:29 pm
Subject: "a has no properties" in GPolyline.fromEncoded
When I try to use GPolyLine.fromEncoded, I get an error:
"Error: a has no properties
Source File: http://www.google.com/mapfiles/78/maps2.api/main.js
Line: 50"

The error seems to be persistent, even in a very simple example, see:
http://blog.ozo.dk/gmap/gmap2.html

Any help is very much appreciated!!


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
Mike Williams  
View profile  
 More options Jun 2 2007, 8:31 pm
From: Mike Williams <nos...@econym.demon.co.uk>
Date: Sun, 3 Jun 2007 01:31:50 +0100
Local: Sat, Jun 2 2007 8:31 pm
Subject: Re: "a has no properties" in GPolyline.fromEncoded
That's completely the wrong syntax for GPolyline.fromEncoded.

It's not your fault, the documentation in the class reference page is
wrong.

The syntax is like this
http://www.google.com/apis/maps/documentation/#Encoded_Polylines

not like this
http://www.google.com/apis/maps/documentation/reference.html#GPolyline

--
The Blackpool Community Church Javascript Team
http://www.econym.demon.co.uk/googlemaps/


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mark mcclure  
View profile  
 More options Jun 2 2007, 8:39 pm
From: mark mcclure <mcmccl...@unca.edu>
Date: Sat, 02 Jun 2007 17:39:49 -0700
Local: Sat, Jun 2 2007 8:39 pm
Subject: Re: "a has no properties" in GPolyline.fromEncoded
On Jun 2, 5:29 pm, ConnorZ <kristiankj...@gmail.com> wrote:

> When I try to use GPolyLine.fromEncoded, I get an error:
> "Error: a has no properties
> ... see:http://blog.ozo.dk/gmap/gmap2.html

Your syntax for the call to GPolyline.fromEncoded is
incorrect.  Try

map.addOverlay(
  new GPolyline.fromEncoded({
    color: "#0000ff",
    weight: 4,
    opacity: 0.8,
    points: "_eunI_wfhA_ibE_ibE",
    levels: "BB",
    zoomFactor: 32,
    numLevels: 4
  })
);

I've written some stuff on encoded polylines that
you might find helpful:
http://facstaff.unca.edu/mcmcclur/GoogleMaps/EncodePolyline/

Mark


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
ConnorZ  
View profile  
 More options Jun 3 2007, 4:47 am
From: ConnorZ <kristiankj...@gmail.com>
Date: Sun, 03 Jun 2007 01:47:32 -0700
Local: Sun, Jun 3 2007 4:47 am
Subject: Re: "a has no properties" in GPolyline.fromEncoded
Thanks guys! You are the best!! I had really struggled with this for
quite some time! You don't expect the API documentation to be wrong!!

Well - now it works... To start with I set numLevels to 18 and use
"PPPP..." as my points. I know this can be optimized, because not all
points are needed at all zoom levels. But for now it is sufficient
that the line shows up at all!

But another thing: Can you explain me what "zoomFactor" is used for??
The API documentation says:
"For optimization, the zoomFactor parameter should reflect the
approximate magnification between the different zoom level groups
specified in numLevels. For example, given a doubling for each zoom
level and about 4 zoom levels in each group, this value should be set
to 16."

I don't understand the "example". How is 16 calculated?! How can the
parameter be used in general?

Regards
Kristian

On Jun 3, 2:39 am, mark mcclure <mcmccl...@unca.edu> wrote:


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
mark mcclure  
View profile  
 More options Jun 3 2007, 7:51 am
From: mark mcclure <mcmccl...@unca.edu>
Date: Sun, 03 Jun 2007 04:51:14 -0700
Local: Sun, Jun 3 2007 7:51 am
Subject: Re: "a has no properties" in GPolyline.fromEncoded
On Jun 3, 4:47 am, ConnorZ <kristiankj...@gmail.com> wrote:

> But another thing: Can you explain me what "zoomFactor" is used for??
> The API documentation says:
> "For optimization, the zoomFactor parameter should reflect the
> approximate magnification between the different zoom level groups
> specified in numLevels. For example, given a doubling for each zoom
> level and about 4 zoom levels in each group, this value should be set
> to 16."

As I understand it zoomFactor should indicate the
ratio of magnification factors between one level
of the polyline and the next.  Each level of the
polyline corresponds to a group of levels of the
map and the magnification factor doubles for each
increment.  Thus, if one level of the polyline is
supposed to correspond to four levels of the map,
the zoomFactor between levels of the polyline
would be 2^4 = 16. In my experience, you can
frequently fiddle with this parameter quite a bit
without major changes in the line.

Frequently numLevels and zoomFactor should satisfy
zoomFactor^numLevels = 2^18, when working with a
G_NORMAL_MAP.  This could change if you are
working on a map with a different number of zoom
levels itself.  It is also possible that the
structure of the line might dictate a different
zoomFactor.

Hope that helps,
Mark


 
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
End of messages
« Back to Discussions « Newer topic     Older topic »