Changing the way the dynamic

34 views
Skip to first unread message

cobalt

unread,
Dec 1, 2010, 2:52:54 AM12/1/10
to google-map...@googlegroups.com
Hey
I draw a map of two routes, one drawn along the way (dynamic) and the other from point to point (not dynamic). They have set the same points. Now my question is whether there is a possibility that this route from point to point was also dynamic?

The term dynamic, I mean draggable.

cobalt

unread,
Dec 1, 2010, 3:55:59 AM12/1/10
to google-map...@googlegroups.com
I found google.maps.DirectionsRendererOptions polylineOptions (http://code.google.com/apis/maps/documentation/javascript/reference.html) just do not know how to apply, because all I have to create a directionsService.route when I add the var rendererOptions throws me errors that the response does not see this variable.
Słuchaj
Zapis fonetyczny

Rossko

unread,
Dec 1, 2010, 6:43:26 AM12/1/10
to Google Maps JavaScript API v3
It's not clear if you are talking about a polyline created from your
own data, or a route from the Directions service, or one of each. If
you can post a link to your map showing your routes it would help.

cobalt

unread,
Dec 1, 2010, 8:56:26 AM12/1/10
to google-map...@googlegroups.com
This my map:
http://webhost.home.pl/piotr/google_maps_test/maps.html

My english is suck, it is difficult to explain to me the problem....


geoco...@gmail.com

unread,
Dec 1, 2010, 9:10:22 AM12/1/10
to Google Maps JavaScript API v3
On Dec 1, 5:56 am, cobalt <haker....@gmail.com> wrote:
> This my map:http://webhost.home.pl/piotr/google_maps_test/maps.html

Can you provide instructions on how to get a map to appear? (example
values for the 2 boxes)

FYI - I get javascript errors in IE, it doesn't like the comma at the
end of this object:
var rendererOptions = {
draggable: true,
};

-- Larry

geoco...@gmail.com

unread,
Dec 1, 2010, 9:15:06 AM12/1/10
to Google Maps JavaScript API v3
On Dec 1, 6:10 am, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:
> On Dec 1, 5:56 am, cobalt <haker....@gmail.com> wrote:
>
> > This my map:http://webhost.home.pl/piotr/google_maps_test/maps.html
>
> Can you provide instructions on how to get a map to appear?  (example
> values for the 2 boxes)
>
> FYI - I get javascript errors in IE, it doesn't like the comma at the
> end of this object:
> var rendererOptions = {
>         draggable: true,
>
> };

When I put id: Bonn od: Marburg,
I get more javascript errors
Line: 8
Error: Arg: Fraction out of range (0 to 1 allowed)

your polygons (at least some) have strokeOpacity: 2,

that needs to be 1 or less.

-- Larry

>
>   -- Larry
>
>
>
>
>
> > My english is suck, it is difficult to explain to me the problem....- Hide quoted text -
>
> - Show quoted text -

cobalt

unread,
Dec 1, 2010, 9:37:44 AM12/1/10
to google-map...@googlegroups.com
I fix this problem "your polygons (at least some) have strokeOpacity: 2,"

IE take care of the later

Two variables are passed to the value of origin and destination, later draws the way to the blue. I pull out the values on the tables and draws dash (red line) at the points who knows the blue line. But when you move the blue line is I do not update the red.
Squares and markers are added.

cobalt

unread,
Dec 2, 2010, 2:07:41 AM12/2/10
to google-map...@googlegroups.com
I would like to have someone from google employee replied, sorry it is impossible or at least steered the solution.
 
It is possible that more knowledge is enough to google maps api.

I wondered if I did not put a red line in the function and then hook up to DirectionsRenderer. But it beats me the same errors from google api functions.

I ask you for help ...

geoco...@gmail.com

unread,
Dec 2, 2010, 2:16:24 AM12/2/10
to Google Maps JavaScript API v3
I am not from google.

cobalt

unread,
Dec 2, 2010, 2:50:12 AM12/2/10
to google-map...@googlegroups.com
I know. People from Google do not want to become interested in my problem ...

Chris Broadfoot

unread,
Dec 2, 2010, 4:34:43 AM12/2/10
to google-map...@googlegroups.com
Okay, I *think* I now know what you are trying to achieve.

You want to render your custom display around the DirectionsRenderer's own path, and have it update whenever the path is dragged. Correct?

If so, you'll want to listen to the DirectionsRenderer 'directions_changed' event, and update your display (Polygons). See here for reference:

BTW - have you seen the Rectangle class?

Chris(@Google)

On Thu, Dec 2, 2010 at 6:50 PM, cobalt <hake...@gmail.com> wrote:
I know. People from Google do not want to become interested in my problem ...

--
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.

geoco...@gmail.com

unread,
Dec 2, 2010, 8:44:40 AM12/2/10
to Google Maps JavaScript API v3
On Dec 1, 11:50 pm, cobalt <haker....@gmail.com> wrote:
> I know. People from Google do not want to become interested in my
> problem ...

Why do you think they should be?

cobalt

unread,
Dec 3, 2010, 5:48:58 AM12/3/10
to google-map...@googlegroups.com
Out of sheer desire to wear the aid :)

Okay, I *think* I now know what you are trying to achieve.

A little bit :P


You want to render your custom display around the DirectionsRenderer's own path, and have it update whenever the path is dragged. Correct?

This is what I mean.

So I use
'directions_changed' event and It's works but I have array response.routes[0].overview_path, when I use event this array no change values.
Blue road must be stored somewhere in the coordinates in an array. If I could only get these coordinates ....


geoco...@gmail.com

unread,
Dec 3, 2010, 9:06:02 AM12/3/10
to Google Maps JavaScript API v3
Have you seen the examples where I do that?
http://www.geocodezip.com/v3_directions_custom_iconsC.html

-- Larry

cobalt

unread,
Dec 6, 2010, 2:08:24 AM12/6/10
to Google Maps JavaScript API v3
I found the solution. The variables are kept in an array
"result.routes[0].overview_path".
Thanks all for help ^ ^

On Dec 3, 3:06 pm, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:

cobalt

unread,
Dec 6, 2010, 2:08:32 AM12/6/10
to Google Maps JavaScript API v3
I found the solution. The variables are kept in an array
"result.routes[0].overview_path".
Thanks all for help ^ ^

On Dec 3, 3:06 pm, "geocode...@gmail.com" <geocode...@gmail.com>
wrote:
Reply all
Reply to author
Forward
0 new messages