Skip to main content
added 76 characters in body
Source Link
Eric
  • 51
  • 4

2 things here.

  1. You are not specifying Latitude/Longitude values for the setView method, which are required. Lat has a range of -90 to 90, and Long -180 to 180.

  2. A zoom level of 3 is soencompasses an area far away for NYClarger than New York, so large that it is quite possible you wouldn't be able to see overlayed borders of the US states let alone the roads within a particular city. This will make the canvas lookthen results in a blank canvas because what you are viewing is too small in scale to be seen on the map at the zoom level you are using.

Try replacing your line of code var map = L.map('map').setView([988008, 213104], 3); with this:

var map = L.map('map').setView([40.715646, -73.99933], 14);

Use the zoom control if you need to, but you should now be able to see your layer.

2 things here.

  1. You are not specifying Latitude/Longitude values for the setView method, which are required. Lat has a range of -90 to 90, and Long -180 to 180.

  2. A zoom level of 3 is so far away for NYC that it is quite possible you wouldn't be able to see overlayed borders of the US states let alone the roads within a particular city. This will make the canvas look blank.

Try replacing your line of code var map = L.map('map').setView([988008, 213104], 3); with this:

var map = L.map('map').setView([40.715646, -73.99933], 14);

Use the zoom control if you need to, but you should now be able to see your layer.

2 things here.

  1. You are not specifying Latitude/Longitude values for the setView method, which are required. Lat has a range of -90 to 90, and Long -180 to 180.

  2. A zoom level of 3 encompasses an area far larger than New York, so large that it is quite possible you wouldn't be able to see overlayed borders of the US states let alone the roads within a particular city. This then results in a blank canvas because what you are viewing is too small in scale to be seen on the map at the zoom level you are using.

Try replacing your line of code var map = L.map('map').setView([988008, 213104], 3); with this:

var map = L.map('map').setView([40.715646, -73.99933], 14);

Use the zoom control if you need to, but you should now be able to see your layer.

added 38 characters in body
Source Link
Eric
  • 51
  • 4

2 things here.

  1. You are not specifying Latitude/Longitude values for the setView method, which are required. Lat has a range of -90 to 90, and Long -180 to 180.

  2. A zoom level of 3 is so far away for NYC that it is quite possible you wouldn't be able to see overlayed borders of the US states let alone the roads within a particular city. This will make the canvas look blank.

Try replacing your line of code var map = L.map('map').setView([988008, 213104], 3); with this:

var map = L.map('map').setView([40.715646, -73.99933], 14);

Use the zoom control if you need to, but you should now be able to see your layer.

2 things here.

  1. You are not specifying Latitude/Longitude values for the setView method, which are required. Lat has a range of -90 to 90, and Long -180 to 180.

  2. A zoom level of 3 is so far away for NYC that it is quite possible you wouldn't be able to see overlayed borders of the US states let alone the roads within a particular city.

Try replacing your line of code var map = L.map('map').setView([988008, 213104], 3); with this:

var map = L.map('map').setView([40.715646, -73.99933], 14);

Use the zoom control if you need to, but you should now be able to see your layer.

2 things here.

  1. You are not specifying Latitude/Longitude values for the setView method, which are required. Lat has a range of -90 to 90, and Long -180 to 180.

  2. A zoom level of 3 is so far away for NYC that it is quite possible you wouldn't be able to see overlayed borders of the US states let alone the roads within a particular city. This will make the canvas look blank.

Try replacing your line of code var map = L.map('map').setView([988008, 213104], 3); with this:

var map = L.map('map').setView([40.715646, -73.99933], 14);

Use the zoom control if you need to, but you should now be able to see your layer.

added 4 characters in body
Source Link
Eric
  • 51
  • 4

2 things here.

  1. You are not specifying Latitude/Longitude values for the setView method, which are required. Lat has a range of -90 to 90, and Long -180 to 180.

  2. A zoom level of 3 is so far away for NYC that it is quite possible you wouldn't be able to see overlayed borders of the US states let alone the roads within a particular city.

Try replacing your line of code var map = L.map('map').setView([988008, 213104], 3); with this:

var map = L.map('map').setView([40.715646, -73.99933], 14);

Use the zoom control if you need to, but you should now be able to see your layer.

2 things here.

  1. You are not specifying Latitude/Longitude values for setView method, which are required. Lat has a range of -90 to 90, and Long -180 to 180.

  2. A zoom level of 3 is so far away for NYC that it is quite possible you wouldn't be able to see overlayed borders of the US states let alone the roads within a particular city.

Try replacing your line of code var map = L.map('map').setView([988008, 213104], 3); with this:

var map = L.map('map').setView([40.715646, -73.99933], 14);

Use the zoom control if you need to, but you should now be able to see your layer.

2 things here.

  1. You are not specifying Latitude/Longitude values for the setView method, which are required. Lat has a range of -90 to 90, and Long -180 to 180.

  2. A zoom level of 3 is so far away for NYC that it is quite possible you wouldn't be able to see overlayed borders of the US states let alone the roads within a particular city.

Try replacing your line of code var map = L.map('map').setView([988008, 213104], 3); with this:

var map = L.map('map').setView([40.715646, -73.99933], 14);

Use the zoom control if you need to, but you should now be able to see your layer.

corrected spelling, wording
Source Link
Eric
  • 51
  • 4
Loading
Source Link
Eric
  • 51
  • 4
Loading