-
Notifications
You must be signed in to change notification settings - Fork 29
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Error 404 loading - cannot import L.Control.Locate.min #2
Comments
We did this in class, but you missed it because you weren't there, but: Take a look here: Youll need to delete the |
Ahh ok. I’d been looking at that documentation but was under the impression the @Version would just give me the most recent version. |
It’s a little confusing for sure. Did that resolve it? |
Removing the @Version did make the script and css imports work, but I'm still not seeing my location pop up on the map when I open the html. No messages in the console to indicate why that's the case. |
There is one more step. Did you add the console? And then a button should appear on the html you’ll have to click. |
I'm trying to get the .js and .css for the L.Control.Locate function, but the server is not responding. What do I need to do to get these in? Code and error are below:
Code:
`
Console Error:
[Error] Failed to load resource: the server responded with a status of 404 () (L.Control.Locate.min.js, line 0)
[Error] Failed to load resource: the server responded with a status of 404 () (L.Control.Locate.min.css, line 0)
[Error] Refused to execute https://cdn.jsdelivr.net/npm/leaflet.locatecontrol@[VERSION]/dist/L.Control.Locate.min.js as script because "X-Content-Type: nosniff" was given and its Content-Type is not a script MIME type.
[Error] TypeError: L.control.locate is not a function. (In 'L.control.locate({
postition: 'top right'
})', 'L.control.locate' is undefined)
Global Code (main.js:27)
The text was updated successfully, but these errors were encountered: