Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
as in the title, started in the Upgrade/Backport thread now to here:
see http://drupal.org/node/1459606#comment-7346872
and http://drupal.org/node/1459606#comment-7355580
Comment | File | Size | Author |
---|---|---|---|
#19 | gmaps.shapes.polylines.png | 142.92 KB | jaxxed |
#19 | gmaps.shapes.polygons.png | 138.86 KB | jaxxed |
#19 | gmaps.shapes.circles.png | 217.25 KB | jaxxed |
#19 | gmaps.shapes.polyline_encoded.png | 246.77 KB | jaxxed |
#19 | gmaps.shapes.polygon_encoded.png | 255.62 KB | jaxxed |
Comments
Comment #1
jaxxed CreditAttribution: jaxxed commentedPatch
Comment #2
jaxxed CreditAttribution: jaxxed commentedthe 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.
Comment #3
jaxxed CreditAttribution: jaxxed commentedThe 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.
http://drupal.org/node/1984912
I will patch this code so that it skips the encoded shapes if the geometry library isn't loaded.
Comment #4
podarokfolowing up
Looks like this one should be checked and updated in 7.x-2.x. mm??
Comment #5
jaxxed CreditAttribution: jaxxed commentedI'll take a look at the D7 shapes now. With the libraries piece in place it should be smooth.
Comment #6
jaxxed CreditAttribution: jaxxed commentedOk, 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
Comment #7
jaxxed CreditAttribution: jaxxed commentedComment #8
podarokhere are the lot of javascript code
good to see some screenshots for making possible be sure this code is truly working before commiting into HEAD
Comment #9
jaxxed CreditAttribution: jaxxed commentedRE: #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.
Comment #10
podarok#6 commited pushed to 7.x-2.x-dev
will wait for #9
Comment #11
podarokbetter status due to #9
Comment #12
jaxxed CreditAttribution: jaxxed commentedI 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.
J
Comment #13
jaxxed CreditAttribution: jaxxed commentedhere 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)
Comment #14
jaxxed CreditAttribution: jaxxed commentedHere 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.
Comment #15
jaxxed CreditAttribution: jaxxed commentedI found another problem with the code. I will submit another patch.
Comment #16
jaxxed CreditAttribution: jaxxed commentedhere 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.
Comment #17
jaxxed CreditAttribution: jaxxed commentedThe 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.
Comment #18
podaroklooking forward for latest patch for review with screenshots as working
Thanks for working on it!
Comment #19
jaxxed CreditAttribution: jaxxed commentedAttached 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
Comment #20
podarok#16 commited pushed to 7.x-2.x-dev
will be tagged in next RC release
thanks!!!
Comment #22
dway CreditAttribution: dway commentedWell, 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
Comment #22.0
dway CreditAttribution: dway commentedapparantly I can't spell