egeloen / ivory-google-map

Google Map API v3 integration for PHP 5.6+.
MIT License
325 stars 185 forks source link

waypointOrders not working #224

Closed charlieboygis closed 7 years ago

charlieboygis commented 7 years ago

Very well-written library, my compliments. I encountered a problem with waypointOrders (info needed when turning on waypoints optimization). Maybe an outdated mapping (?). Working mapping (with request in XML format) is (at least for me): <property name="waypointOrders" type="array&lt;key=integer,value=integer&gt;" expose="true" xml-inline="true" xml-entry="waypoint_index" xml-key-as-attribute="false" />

Note waypoint_index instead of waypoint_order. Unfortunately with request in JSON format, still is not working.

egeloen commented 7 years ago

@charlieboygis Hey! Thanks for your feedback!

To be honest with you, I have added waypoint order at the very beginning and while rewriting the library I was about to delete it. But then, I let it there just for people like you to explain me how you would like to see the library behave when using optimized waypoints...

So, first, there is a mapping issue if I'm right? I will look into it tonight after my workday. But then, Giving you an array of optimized waypoints index is a mess IMO as it does not bring real value since you will still need to do extra work to get waypoints in the right order or am I missing something?

Then, how would you like to see behave when there are waypoint orders? Re-order waypoints according to optimized indexes automatically? or let you reorder things? or ...

charlieboygis commented 7 years ago

I @egeloen ! Thank you for your quick answer. I would only like to have the optimized waypoints index, just like Google put them into the response. Just for completeness. I am willing to do the extra work to reorder things (it's just a little price to pay;-)

egeloen commented 7 years ago

@charlieboygis Your issue should be fixed by the referenced PR for json & xml formats :)

egeloen commented 7 years ago

@charlieboygis If you can confirm that it's working for you, I will tag the 2.0.1.

charlieboygis commented 7 years ago

tested right now, everything is ok and working (JSON and XML)! thank you.

egeloen commented 7 years ago

Thanks! Just tag the 2.0.1.