Google Groups Home
Help | Sign in
Editing GPolyline (middle points)
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
  6 messages - Collapse all
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
Paweł  
View profile
 More options Jul 5, 6:54 pm
From: Paweł <duszc...@gmail.com>
Date: Sat, 5 Jul 2008 06:54:40 -0700 (PDT)
Local: Sat, Jul 5 2008 6:54 pm
Subject: Editing GPolyline (middle points)
I was wonder if the is any possibility to disable middle points
between Vertex'es? I have code for editing existing polyline's points
but if i want to add some point it occures error. I dont realy have
need to add  those point so can i disable them or just make them
invisible/uneditable?

    Reply    Reply to author    Forward  
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.
marcelo  
View profile
 More options Jul 5, 11:58 pm
From: marcelo <marcelo...@hotmail.com>
Date: Sat, 5 Jul 2008 11:58:59 -0700 (PDT)
Local: Sat, Jul 5 2008 11:58 pm
Subject: Re: Editing GPolyline (middle points)
Please follow the posting guidelines.
Show us the page where you get the error and give instructions to
reproduce.

--
Marcelo - http://maps.forum.nu
--


    Reply    Reply to author    Forward  
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.
Paweł  
View profile
 More options Jul 6, 1:46 am
From: Paweł <duszc...@gmail.com>
Date: Sat, 5 Jul 2008 13:46:17 -0700 (PDT)
Local: Sun, Jul 6 2008 1:46 am
Subject: Re: Editing GPolyline (middle points)
Oh, yes sorry. Adress is:
http://yoorg.pavulon.pl
and You will need this file to upload:
http://yoorg.pavulon.pl/20080622152515.log
as example of working it. All script is going to convert LOG to GPX
file, show some info about lenght of GPolyline etc. At bottom You will
have map. When You click "Edytuj" GPolyline became editable. Problem
is when someone will click point between two oryginal points. I dont
realy need to have posibility to add some points to orginal polyline,
only moving orginal points willl do the job perfectly. Problem occures
because function needs two arguments to work properly, and if someone
wants to add new point there is only one parameter.
If someone would tel me how to disable this posibility to add points
i'd be grateful.

    Reply    Reply to author    Forward  
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.
marcelo  
View profile
(1 user)  More options Jul 6, 5:39 am
From: marcelo <marcelo...@hotmail.com>
Date: Sat, 5 Jul 2008 17:39:34 -0700 (PDT)
Local: Sun, Jul 6 2008 5:39 am
Subject: Re: Editing GPolyline (middle points)
Ok, that was more clear.
What I still do not understand is why you make it editable at all.
If you want to remove the in-between markers because they are notpart
of the route registered by the GPS, then editing at all would have the
same result.

Regardless, I don't think there is a way to disable the in-between
points.
If you don't want them, then you need to implement your own editing
function, without using GPolyline.enableEditing().

You can put your own small square markers on the ends of each segment
of the polyline, make those markers draggable, and handle the marker's
'dragstart', 'drag' and 'dragend' events, and modify the line
according to their movement.
It's a bit more work, but not too much compared to what you already
have done in that page. :-)

--
Marcelo - http://maps.forum.nu
--


    Reply    Reply to author    Forward  
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.
dfd (Trustworthy from experience)  
View profile
(1 user)  More options Jul 6, 10:50 am
From: "dfd (Trustworthy from experience)" <dfddurstew...@googlemail.com>
Date: Sat, 5 Jul 2008 22:50:00 -0700 (PDT)
Subject: Re: Editing GPolyline (middle points)
If i understand you correctly, you want not to display these "ghost"-
markers which are inserted automagically at all?
Thats easy, just set the maxVertices option while enableEditing. I do
this with a toggle button for show/hide the ghosts.

The relevant lines of code from a greater function:
...
  var showGhost = false; // hide GostMarkers
...
  poly.disableEditing();
...
  poly.enableEditing({maxVertices: ((showGhost) ? 99999 : 1)}); // no
poly should reach 99999 vertices
...

or, if you in no case would not show the ghosts:

poly.enableEditing({maxVertices: 1});

The documentation of this option is misleading, IMHO.

HTH, frank aka dfd

On 5 Jul., 15:54, Paweł <duszc...@gmail.com> wrote:


    Reply    Reply to author    Forward  
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.
Paweł  
View profile
 More options Jul 6, 1:42 pm
From: Paweł <duszc...@gmail.com>
Date: Sun, 6 Jul 2008 01:42:17 -0700 (PDT)
Local: Sun, Jul 6 2008 1:42 pm
Subject: Re: Editing GPolyline (middle points)
The meaning to move original markes is to avoind some mesure mistakes.
GPS can have some margin of mistake. Guy who i'm writing this puted
there some LOG ind script occured that he was driwing thru the lake,
so good option will be to edit some of the points if there is such
need. So there is no neeed to add points (ghost markers - i forgot
this name), just move couple of them will do :)

This line:
poly.enableEditing({maxVertices: 1});

Works exacly as i wanted to work :)

Realy, realy, realy thank You all :)


    Reply    Reply to author    Forward  
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 »

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google