as in the title, started in the Upgrade/Backport thread now to here:
the polyline and polygon shapes require use of the google maps encoding and decoding functionality, which is inside an additional library. I will submit a core feature request to get google maps libraries functionality added properly.
The new method for using polyline and polygon encoding requires that you include libraries when you make your first gmaps call. There is a patch to do it.
This patch provided will work, but will produce a JS error if you try to use encoded lines in the JS layer.
I will patch this code so that it skips the encoded shapes if the geometry library isn't loaded.
Looks like this one should be checked and updated in 7.x-2.x. mm??
I'll take a look at the D7 shapes now. With the libraries piece in place it should be smooth.
Ok, applied now to 7.x-2.x and :
1. added checks on all google.maps.geometry calls to SILENTLY FAIL if the event isn't loaded (would prefer a console.debug or something but wasn't sure what to put there.)
2. cleaned some of the shape styling;
3. streamlined an if to a switch to remove redundant code
4. put in some comments
5. changed obj.vars.behaviors.shapesactions to shapesextraevents to be similar to the gmaps_marker
good to see some screenshots for making possible be sure this code is truly working before commiting into HEAD
RE: #8 :I agree, it would be good. I have some screenshots that I can supply, but it's just for lines (encoded and decoded) and then some instances where i faked polygons from lines. If polygons work, then rpolygons will work, but I don't have any great testing spot for circles.
QUESTION: should the highlight.js implement highlights via shapes? there is an overlap in functionality, but I think that the usecases are so separate that they shouldn't be joined (adding shapes/removing shapes events shouldn't trigger on highlighting.)
I will try my best to give you a test spot this week with all of the implementations. THIS DOES NEED MORE REAL WORLD TESTING.
IMHO the changes won't be removed, but rather improved upon, as they fix the gmaps v2 retirement problem.
#6 commited pushed to 7.x-2.x-dev
will wait for #9
better status due to #9
I will have some time to put in today. I have only simulated environment tests (no drp7 real world cases.) I will put up a test site to demo.
here is an additional patch for some problems with the previous patch. This patch was created from a diff taken from today's diff; is it ok to put this new patch in the same thread as the old patch?
DON'T USE THIS PATCH (see below)
Here is a test site : http://drupal.12thirty4.com/gmaps/gmaptest/shapes
it's a quick site with some 200 nodes create with dev generate. some of them have locations. The form will pick a number of the locations, and use them for markers. You can pick a shape to switch from markers to a line or polygon. You can also bypass the location nodes by giving an encoded string.
Below the form is a var_export of the settings passed to the gmaps handler.
This site is currently open so you can play with it all you want. I will put http auth on it if traffic get weird or if the net-folks take advantage.
I found another problem with the code. I will submit another patch.
here is a better fix for some shapes problems.
the rpolygon case is still not working due to problems with the poly.js calcPolyPoints() function, which uses a function that converts latitiude into radians.
Is RPolygon still a priority.
The test site above now works for circles as well. For circles it adds a circle to every point for a node (no using encoding.)
I've tested the circles both with passing in a meters radius, and passing in a point2. The test site does both, but there is not control to switch between the 2. I am out of time to put into this today.
looking forward for latest patch for review with screenshots as working
Thanks for working on it!
Attached are screenshots from : http://drupal.12thirty4.com/gmaps/gmaptest/shapes
This is using the patch from #16, which applies to recent 7.x-2.x git
#16 commited pushed to 7.x-2.x-dev
will be tagged in next RC release
Automatically closed -- issue fixed for 2 weeks with no activity.
Well, it still does not work...
I did a patch 2 weeks ago, fixing little things that fixed the module.
But nobody tested this... :https://drupal.org/node/1996416
apparantly I can't spell
This issue has no child issues.
Drupal is a registered trademark of Dries Buytaert.