Changeset 2481988
- Timestamp:
- 02/26/2021 05:59:33 AM (5 years ago)
- Location:
- osm-map-elementor
- Files:
-
- 2 edited
-
tags/1.0.6/osm-map.php (modified) (1 diff)
-
trunk/osm-map.php (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
osm-map-elementor/tags/1.0.6/osm-map.php
r2481795 r2481988 1612 1612 } else { 1613 1613 1614 // get current user's coordinates for default render 1615 jQuery.get("https://ipinfo.io/json", function (response) { 1616 let [lat, lng] = response.loc.split(','); 1617 1618 // update the markers with default coordinates 1619 markers.push({ 1620 lat: lat, 1621 lng: lng, 1622 marker: { 1623 button_text: "", 1624 button_url: "", 1625 marker_coords: response.loc, 1626 marker_description: "", 1627 marker_location: "", 1628 marker_title: "", 1629 show_button: "no" 1630 } 1631 }); 1632 1633 // set center coordinates 1634 map.setView([lat, lng], zoom); 1635 1636 // build our markers 1637 buildMarkers(markers); 1638 1639 }, "jsonp"); 1614 // set our default coordinates to San Francisco 1615 let lat = 37.7749295; 1616 let lng = -122.4194155; 1617 1618 // update the markers with default coordinates 1619 markers.push({ 1620 lat: lat, 1621 lng: lng, 1622 marker: { 1623 button_text: "", 1624 button_url: "", 1625 marker_coords: { 1626 lat, 1627 lng 1628 }, 1629 marker_description: "", 1630 marker_location: "", 1631 marker_title: "", 1632 show_button: "no" 1633 } 1634 }); 1635 1636 // set center coordinates 1637 map.setView([lat, lng], zoom); 1638 1639 // build our markers 1640 buildMarkers(markers); 1640 1641 } 1641 1642 -
osm-map-elementor/trunk/osm-map.php
r2481787 r2481988 1612 1612 } else { 1613 1613 1614 // get current user's coordinates for default render 1615 jQuery.get("https://ipinfo.io/json", function (response) { 1616 let [lat, lng] = response.loc.split(','); 1617 1618 // update the markers with default coordinates 1619 markers.push({ 1620 lat: lat, 1621 lng: lng, 1622 marker: { 1623 button_text: "", 1624 button_url: "", 1625 marker_coords: response.loc, 1626 marker_description: "", 1627 marker_location: "", 1628 marker_title: "", 1629 show_button: "no" 1630 } 1631 }); 1632 1633 // set center coordinates 1634 map.setView([lat, lng], zoom); 1635 1636 // build our markers 1637 buildMarkers(markers); 1638 1639 }, "jsonp"); 1614 // set our default coordinates to San Francisco 1615 let lat = 37.7749295; 1616 let lng = -122.4194155; 1617 1618 // update the markers with default coordinates 1619 markers.push({ 1620 lat: lat, 1621 lng: lng, 1622 marker: { 1623 button_text: "", 1624 button_url: "", 1625 marker_coords: { 1626 lat, 1627 lng 1628 }, 1629 marker_description: "", 1630 marker_location: "", 1631 marker_title: "", 1632 show_button: "no" 1633 } 1634 }); 1635 1636 // set center coordinates 1637 map.setView([lat, lng], zoom); 1638 1639 // build our markers 1640 buildMarkers(markers); 1640 1641 } 1641 1642
Note: See TracChangeset
for help on using the changeset viewer.