Where is conflict with Yandex Maps module: Swapped Latitude and Longitude values on FieldFormatter. See #9.

I think better not change default coordorder value, but it this case in Yandex Maps module we should to swap lat and lot in all geometric figures. And it is problem.
But if add the coordorder parameter in this module we should change only single line :)

Patch will be attached.

Comments

super_romeo created an issue. See original summary.

super_romeo’s picture

Status: Active » Needs review
StatusFileSize
new1.35 KB
super_romeo’s picture

Status: Needs review » Needs work

My patch is beginning and it need to make some other changes in code.
So for now I will just not put this 2 formatters together on same page.

christianadamski’s picture

Status: Needs work » Postponed (maintainer needs more info)

So, commit the path or not?

super_romeo’s picture

My patch is incomplete. Need more work.

christianadamski’s picture

A side question: there is an issue with a patch attached for adding a Yandex based field widget.

That patch also alters how lat/lon are retrieved. Could you take a look at that patch?

super_romeo’s picture

Sure. I can look at. What patch do you talking about?

super_romeo’s picture

From the very beginning.
In initialisation URL https://api-maps.yandex.ru there is parameter coordorder. By default it's value is latlong. And it is convenient to set placemarks in usual manner (e.g. new Placemark(lat,lon);). But in this case we should pass all geometric shapes in same manner (e.g. Point(Y X)) because of lat is Y and lon=X) and Yandex Maps module must convert ALL shapes (Points, Polygons, Multipolygons, ...) from "X,Y" to "Y,X" order. And I didn't found the ready-to-use converter.

In for compatibility we can set coordorder=longlat and change the order of (lat,lon) to (lon,lat) in all places. It would be much easy I guess.

Patch in #8 looks good and in case of coordorder=longlat all (lat,lon) places should be just changed to (lon, lat) order too.

christianadamski’s picture

Hey, what about this issue? Just wait? Still relevant? Close?

super_romeo’s picture

If you agree with coordorder=longlat I can make a patch.

christianadamski’s picture

Yeah, I can add the Parameter myself, no problem. But is it useful? Is there something broken right now? Should we write a test for that?

super_romeo’s picture

Is there something broken right now?

No. This change is required for using geolocation yandex map and geofield yandex map on the same page.
I guess test is not required.
In patch we need to set this parameter and swap lat and lon in new Placemark(lat,lon) and other places.

christianadamski’s picture

Ok. Well, you decide as you see fit. You can close this issue, or leave postponed until a patch. Your call :)

super_romeo’s picture

Status: Postponed (maintainer needs more info) » Needs review
StatusFileSize
new2.77 KB

  • super_romeo authored 6850a2f on 8.x-3.x
    Issue #3096776 by super_romeo: Conflict with Yandex.Maps
    
christianadamski’s picture

Status: Needs review » Fixed

Comitted

super_romeo’s picture

Status: Fixed » Needs review
StatusFileSize
new1009 bytes

One more fix.

super_romeo’s picture

StatusFileSize
new2.67 KB

And one more fix.

super_romeo’s picture

christianadamski’s picture

Status: Needs review » Fixed

  • super_romeo authored 3a6a050 on 8.x-3.x
    Issue #3096776 by super_romeo: Conflict with Yandex.Maps
    
christianadamski’s picture

Thanks!

Status: Fixed » Closed (fixed)

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