I have on my site a section where it displays a map based on Longitude and Latitude coordinates. How exactly can I change or get the number/coordinates of a another state,city, or location ? I tried typing in on Google "Latitude and Longitude of New York" and got the site http://www.latlong.net/
It seemed like the coordinates would work from the website,
For example New York City is Latitude : 40.714353 Longitude: -74.005973
I put them in into my div below but they did not show anything up on the map. If you look below the default coordinates are for California and work just fine. Why is this?
<div
class="map"
data-latitude="37,773606"
data-longtitude="-122,490382"
></div>
Here is my Google Position settings
// Get map position
var $map = $('#contact .map');
var latitude = parseFloat($map.data('latitude').replace(',', '.'));
var longtitude = parseFloat($map.data('longtitude').replace(',', '.'));
var center = new google.maps.LatLng(latitude - 0.003105999999997721, longtitude);
// Render map
var map = new google.maps.Map($map[0], {
zoom: 16,
scrollWheel: false,
center: center,
mapTypeId: google.maps.MapTypeId.ROADMAP,
mapTypeControl: false,
panControlOptions: {
position: google.maps.ControlPosition.LEFT_CENTER
},
zoomControlOptions: {
position: google.maps.ControlPosition.LEFT_CENTER
},
scaleControlOptions: {
position: google.maps.ControlPosition.LEFT_CENTER
}
});