Answers.Body: <p>Was out of town so couldn't answer this question until now. With Google Maps for Craft you can do so like this:</p>
  
  <pre><code>{% set marker = entry.yourMapField.getMarker(0) %}
  
  {{ marker.lat }} {{ marker.lng }}
  </code></pre>
  
  <p>Or you can loop through all the markers on the map like this:</p>
  
  <pre><code>{% for entry in craft.entries.section('news') %}
  
      {% for marker in entry.yourMapField.getMarkers() %}
  
          {{ marker.address }}&lt;br&gt;
  
      {% endfor %}
  
  {% endfor %}
  </code></pre>
  
  <p><a href="https://github.com/objectivehtml/Google-Maps-for-Craft/wiki/Getting-Address-From-Map-Markers" rel="nofollow">https://github.com/objectivehtml/Google-Maps-for-Craft/wiki/Getting-Address-From-Map-Markers</a></p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-30T20:48:58.877Z
Answers.LastActivityDate: 2015-06-30T20:48:58.877Z
Answers.UserDisplayName: Justin Kimbrell
Answers.Body: <p>I don’t know about ObjectiveHTML’s Google Maps plugin, but this is easy to do using Lindsey DiLoreto’s <a href="https://craftpl.us/plugins/smart-map/" rel="nofollow">Smart Map</a> plugin, which comes with an “Address” field type.</p>
  
  <p>Per the “<a href="https://craftpl.us/plugins/smart-map/docs/using-an-address-field" rel="nofollow">Using an Address Field</a>” documentation, you can output latitude and longitude values like this:</p>
  
  <pre class="lang-twig prettyprint-override"><code>Latitude: {{ entry.address.lat }}&lt;br /&gt;
  Longitude: {{ entry.address.lng }}
  </code></pre>
  
  <p>(In that example, <code>entry</code> is an entry that has an Address field called <code>address</code>.)</p>
  
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-30T22:05:37.993Z
Answers.Text: Just used Smart Map, the best plugin IMO out there to manage maps.
Answers.UserDisplayName: Jason Mayo
Answers.ContentLicense: CC BY-SA 3.0
Answers.CreationDate: 2015-06-26T18:26:13.587Z
Answers.LastActivityDate: 2015-06-26T18:26:13.587Z
Answers.UserDisplayName: Brandon Kelly
Body: <p>I just need to return the latitude and longitude of my Google Maps marker.  I do not want to make a request to Google, nor do I need to display a map with javascript.  I need to create markers inside of blog entries and only return the coordinates.</p>
  
  <p>Can the Google Maps plugin do this?  Can I pass the lat and lng to text fields when i save the entry?</p>
  
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-25T02:46:11.290Z
Comments.Text: Which google maps plugin are you referring to?
Comments.UserDisplayName: Aaron Berkowitz
Comments.ContentLicense: CC BY-SA 3.0
Comments.CreationDate: 2015-06-25T13:51:03.690Z
Comments.Text: Google Maps for Craft : https://github.com/objectivehtml/Google-Maps-for-Craft/
  
  I would open to using something else, as long as I could add a marker within the publish page.
Comments.UserDisplayName: SteveO
Tags: <plugins>
Title: Google Maps Plugin return coordinates
ThreadText: # Google Maps Plugin return coordinates
  
  (Asked by: username_0 on 2015-06-25)
  
  I just need to return the latitude and longitude of my Google Maps marker. I do not want to make a request to Google, nor do I need to display a map with javascript. I need to create markers inside of blog entries and only return the coordinates.
  
  Can the Google Maps plugin do this? Can I pass the lat and lng to text fields when i save the entry?
  
  **Tags:** plugins
  
  > **Comments:**
  > **username_1**: Which google maps plugin are you referring to?  
  > **username_0**: Google Maps for Craft : https://github.com/objectivehtml/Google-Maps-for-Craft/  I would open to using something else, as long as I could add a marker within the publish page.  
  
  ---
  
  ## 2 answers
  
  ### Answer by username_2 on 2015-06-30. Score: 4
  
  Was out of town so couldn't answer this question until now. With Google Maps for Craft you can do so like this:
  
  ```
  {% set marker = entry.yourMapField.getMarker(0) %}
  
  {{ marker.lat }} {{ marker.lng }}
  
  ```
  
  Or you can loop through all the markers on the map like this:
  
  ```
  {% for entry in craft.entries.section('news') %}
  
      {% for marker in entry.yourMapField.getMarkers() %}
  
          {{ marker.address }}<br>
  
      {% endfor %}
  
  {% endfor %}
  
  ```
  
  <https://github.com/objectivehtml/Google-Maps-for-Craft/wiki/Getting-Address-From-Map-Markers>
  
  
  ---
  
  ### Answer by username_3 on 2015-06-26. Score: 3
  
  I don’t know about ObjectiveHTML’s Google Maps plugin, but this is easy to do using Lindsey DiLoreto’s [Smart Map](https://craftpl.us/plugins/smart-map/) plugin, which comes with an “Address” field type.
  
  Per the “[Using an Address Field](https://craftpl.us/plugins/smart-map/docs/using-an-address-field)” documentation, you can output latitude and longitude values like this:
  
  ```twig
  Latitude: {{ entry.address.lat }}<br />
  Longitude: {{ entry.address.lng }}
  
  ```
  
  (In that example, `entry` is an entry that has an Address field called `address`.)
  
  > **Comments:**
  > **username_4**: Just used Smart Map, the best plugin IMO out there to manage maps.  
  
  ---
  
  