Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    primarykey
    data
    text
    <p>It seems from the look of your code you aren't accessing the lat and lng properly. The google maps api library is minified. The variable names are often shortened to a random set of characters. You shouldn't approach the x and y through these variables but through their getters: ie. <code>lat()</code> and <code>lng()</code> to avoid the same issue with future versions. Hopefully, this is the issue that's causing your direction to not render.</p> <p>The proper recommended way to obtain lat and lng is similar to the following:</p> <pre><code>results[0].geometry.location.lat().toFixed(3); results[0].geometry.location.lng().toFixed(3); </code></pre> <hr> <p>So, for instance this following line should be:</p> <pre><code>step.start_location = new google.maps.LatLng(step.start_location.wa,step.start_location.ya); step.end_location = new google.maps.LatLng(step.end_location.wa,step.end_location.ya); </code></pre> <p>To:</p> <pre><code>step.start_location = new google.maps.LatLng(step.start_location.lat(), step.start_location.lng()); step.end_location = new google.maps.LatLng(step.end_location.lat(), step.end_location.lng()); </code></pre> <hr> <p>Storage of Google Map Data is within term of service. Here is the restriction that you might want to take a look before you go further with your data storage:</p> <blockquote> <pre><code> 10.1.3 Restrictions against Data Export or Copying. (a) No Unauthorized Copying, Modification, Creation of Derivative </code></pre> <p>Works, or Display of the Content. You must not copy, translate, modify, or create a derivative work (including creating or contributing to a database) of, or publicly display any Content or any part thereof except as explicitly permitted under these Terms. For example, the following are prohibited: (i) creating server-side modification of map tiles; (ii) stitching multiple static map images together to display a map that is larger than permitted in the Maps APIs Documentation; (iii) creating mailing lists or telemarketing lists based on the Content; or (iv) exporting, writing, or saving the Content to a third party’s location-based platform or service.</p> <pre><code> (b) No Pre-Fetching, Caching, or Storage of Content. You must not </code></pre> <p>pre-fetch, cache, or store any Content, except that you may store: (i) limited amounts of Content for the purpose of improving the performance of your Maps API Implementation if you do so temporarily, securely, and in a manner that does not permit use of the Content outside of the Service; and (ii) any content identifier or key that the Maps APIs Documentation specifically permits you to store. For example, you must not use the Content to create an independent database of “places.”</p> <pre><code> (c) No Mass Downloads or Bulk Feeds of Content. You must not use the </code></pre> <p>Service in a manner that gives you or any other person access to mass downloads or bulk feeds of any Content, including but not limited to numerical latitude or longitude coordinates, imagery, visible map data, or places data (including business listings). For example, you are not permitted to offer a batch geocoding service that uses Content contained in the Maps API(s).</p> </blockquote>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. VO
      singulars
      1. This table or related slice is empty.
    2. VO
      singulars
      1. This table or related slice is empty.
    3. VO
      singulars
      1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload