NetTalk Central

Author Topic: Netmaps spanish characters in legends gives error400  (Read 3608 times)

Alberto

  • Hero Member
  • *****
  • Posts: 1873
    • MSN Messenger - alberto-michelis@hotmail.com
    • View Profile
    • ARMi software solutions
    • Email
Netmaps spanish characters in legends gives error400
« on: September 24, 2020, 09:36:22 AM »
Using spanish characters in the legend for it to be sent to Here in the URL gives error 400

You are using the legend and not the ID when using Getroute, if its not possible to change legend by ID, you willl need to URLencod() the legend, and may ne the ID too when added to the URL.
This is in _MakeWaypointsForCalc not in _MakeWaypointsForOptimize which uses the ID

https://route.ls.hereapi.com/routing/7.2/calculateroute.json?apiKey=Uru1aFINkHfp1r1Kx7jOETRWHMnfkHYqGSObPDTydms&waypoint0=-34.4691908,-58.7939226;;A. Álvarez 5718, Del Viso&waypoint1=-34.4671669,-58.8612255;;Pilar del Lago Country Club  2345, Amancio Alcorta&waypoint2=-34.4721695,-58.7458601;;Batalla de Maipú 3515, José C. Paz&waypoint3=-34.4438808,-58.9263906;;Barrio Cerrado la Martinica  1300, Las Margaritas&waypoint4=-34.4201739,-58.7732211;;San Salvador 3736, Manuel Alberti&waypoint5=-34.4484294,-58.8449678;;Puyehue 35, La Lonja&mode=fastest;car;traffic:enabled&metricSystem=metric&departure=now&avoidseasonalclosures=true&routeattributes=shape&

If you copy this to a browser it works but itis modified.
In NetMaps it gives error400 without any clue.

Ive added:
        st.SetValue(clip(self.WaypointsQueue.Label))
        st.UrlEncode(st:NoPlus)
        self.WaypointsQueue.Label = st.GetValue()
before
    if self.WaypointsQueue.type <> 'street!'

in _MakeWaypointsForCalc  proc and it works ok

« Last Edit: September 24, 2020, 10:34:22 AM by michelis »
-----------
Regards
Alberto

Bruce

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 11250
    • View Profile
Re: Netmaps spanish characters in legends gives error400
« Reply #1 on: September 29, 2020, 06:46:40 PM »
done for 11.46