Jump to content


  • Posts

  • Joined

  • Last visited

Recent Profile Visitors

The recent visitors block is disabled and is not being shown to other users.

mbpowner's Achievements


Newbie (1/7)



  1. sorry about this.. managed to resolve this too by putting it all in the method.. not sure why it wasn't accessible to the variables outside though
  2. By means of further experiment, I found that the api key does not matter. i tried entering the values of the coordinates directly for google maps to display. it works then. however, it just seems to be an issue when using the objects UserCoords.lat and UserCoords.lng in the google.maps.latlng(UserCoords.lat,UserCoords.lng) object... what data types does the latlng take and how do i transfer it?
  3. I figured it was to do with me using the wrong API key. i kinda tried to use an open api key out there, but that failed. that must be something to do with secureness, i suppoe. something has changed lately. but anyways it worked when i created my own api key. anyhow, still working on the google maps... they're just warnings regarding the api key, and was working fine before for sure. now i'm just not sure why it's showing a blue sky instead of land. also my location seems to be showing zagreb, when i'm actually in england. i think this is due to the inaccuracy of the api. i tried using the coordinates and they showed the right place with google... so the coordinates are right... but the sky is, for some reason, displayed on the map. whereas on the google maps website these coordinates display my universtiy
  4. That's weird because it worked like this, just a few weeks ago. Could you tell me why the JSON data isnt loading please using that api ?
  5. Ahh I managed to see the issue was that, for some reason, you need to have a UserCoords object in order to be visible the latitude & longitude globally instead of setting long and lat variables, the variables will be undefined but using an object it works for some odd reason... Anyhow, managed to resolve hte null llocation issue. Other issue is the map won't load. If you click on the settings on the javascript you can see that this is my script src that i have used: https://maps.googleapis.com/maps/api/js?v=3.exp&sensor=false not sure why this isn't working... it used to work i'm also not sure why my JSON data isn't working ?
  6. but i havent used a callback function so i dont really know how to change that as i wish to leave it as it is where it loads as soon as the page is loaded..
  7. also this error "Google Maps API warning: InvalidKey https://developers.google.com/maps/documentation/javascript/error-messages#invalid-key"
  8. firstly i am getting this error "jQuery.Deferred exception: Can't find variable: google" "https://s.codepen.io/boomerang/iFrameKey-568d6cd1-874a-d6dd-bd79-55f4353f18e0/index.html?editors=1111:239:24
  9. https://codepen.io/CodeCampStart/pen/MvxZbz?editors=1111
  10. Sorry, my question was why the getCurrentLocation() method returns null...
  11. Yh whoops, that's what I meant LOL. My bad. Just bcuz I code in java normally so it's easy to get carried away with the language and forget the syntax for the specific language. And that for loop was written in a bit of a rush. My apologies also just realized. There should be no int in the parameter of the function
  12. Values arent being returned unless n is less than 2. Also, I'm not sure I think this is the best way to approach it: This is because is a number is divisible by any even number, it's definitely divisible by 2. Just a suggestion on improving the efficiency.
  • Create New...