on-internet
← Community

Why does this code for populating a leaflet map page return "ReferenceError: TileLayer is not defined"?

Stack Overflow ·

I found this Leaflet HTML map script below by a browser search. The Leaflet website has a very similar script. In both instances, the zoom up/down button is shown, but no mapping tiles are shown. The main issue is I do not know how to request mapping tiles with Leaflet. I need to use tile request to Leaflet in order to use the osrm API + the openstreetmap API to create a map route between two markers and display the results on a map. How can I get this code to work as I described above? <!DOCTYPE html> <html lang="en"> <head> <meta charset="UTF-8" /> <meta name="viewport" content="width=device

Comments

Sign in or sign up to comment and upvote.

No comments yet.