If you try to run a locpick change, but no original marker exists then the operation fails. Additionally there is no API method for testing if it exists, and no alternative method to create the first marker.

Additionally there is a flaw that if the original locpick_invalid is set to true, and a location is set, the system still thinks it is invalid.

The only inline solution is to duplicate the marker creation in the 'init' handler, and manually attach it to the obj. If we could extract that marker generation, and maybe put it in locpickchange, with a validation there, then things would be tested at the appropriate time, and external elements could safely trigger locpickchange.

I have a patch to submit.

Comments

jaxxed’s picture

Here is a patch that:
- moves marker generation to the locpickchange event
- init uses lockpickchange
- locpick_invalid checked on locpickchange
- allow parameter position to lockpickchange (you can still manuallly set locpick_coord)

jaxxed’s picture

Status: Active » Needs review
podarok’s picture

Version: 6.x-2.x-dev » 7.x-2.x-dev
Status: Needs review » Needs work

all feature requests should be rolled against latest dev and after commit backported to previous version

jaxxed’s picture

Status: Needs work » Needs review

#1: gmap-lockpickmarkergenerationinlockpickchange-1980340-1.patch queued for re-testing.

I think that the D7 and D6 lockpick JS are the same, so I will try to rerun the test.

Status: Needs review » Needs work

The last submitted patch, gmap-lockpickmarkergenerationinlockpickchange-1980340-1.patch, failed testing.

jaxxed’s picture

Status: Needs work » Needs review
StatusFileSize
new5.54 KB

recreated patch from 7.x-2.x branch.

I simplified my approach a little bit to remove some unnecessary changes I'd made.

podarok’s picture

Status: Needs review » Fixed

#6 commited pushed to 7.x-2.x
Thanks!!!!!

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.