Find Jobs
Hire Freelancers

Javascript - Save Geolocation Coordinates

$10-30 USD

Suoritettu
Julkaistu lähes 6 vuotta sitten

$10-30 USD

Maksettu toimituksen yhteydessä
I would like to save the coordinates in localstorage so that it shouldn't ask the users every time to allow GPS or Location and a button to clear the localstorage value so it can again ask for coordinates? Also it should work with Android & IOS Mobile View. FYI: I am using Praytimes JS to display Muslim prayer times but for each location i have to manually add latitude & longitude of that location. Below is my code: <script type="text/javascript" src="[login to view URL]"></script> <script type="text/javascript"> var x = [login to view URL]("currentlocation"); var geocoder; if ([login to view URL]) { [login to view URL](successFunction, errorFunction); } //Get the latitude and the longitude; function successFunction(position) { var lat = [login to view URL]; var lng = [login to view URL]; codeLatLng(lat, lng) } function errorFunction(){ $('#currentlocation').html("Geocoder failed"); } function initialize() { geocoder = new [login to view URL](); } function codeLatLng(lat, lng) { var latlng = new [login to view URL](lat, lng); [login to view URL]({'latLng': latlng}, function(results, status) { if (status == [login to view URL]) { [login to view URL](results) if (results[1]) { //formatted address $('#currentlocation').html(results[0].formatted_address); //find country name for (var i=0; i<results[0].[login to view URL]; i++) { for (var b=0;b<results[0].address_components[i].[login to view URL];b++) { //there are different types that might hold a city admin_area_lvl_1 usually does in come cases looking for sublocality type will be more appropriate if (results[0].address_components[i].types[b] == "administrative_area_level_2") { //this is the object you are looking for city= results[0].address_components[i]; break; } } } //city data $('#currentlocation').html(city.short_name + " " + city.long_name) } else { $('#currentlocation').html("No results found"); } } else { $('#currentlocation').html("Geocoder failed due to: " + status); } }); } </script> <p id="currentlocation"></p> <script type="text/javascript" src="[login to view URL]"></script> <script type="text/javascript"> function loadTable(position) { [login to view URL]('MWL'); var date = new Date(); // today var times = [login to view URL](date, [[login to view URL], [login to view URL]]); var list = ['Fajr', 'Sunrise', 'Dhuhr', 'Asr', 'Maghrib', 'Isha', 'Midnight']; var html = '<table id="timetable">'; html += '<tr><th colspan="2">'+ [login to view URL]()+ '</th></tr>'; for(var i in list) { html += '<tr><td>'+ list[i]+ '</td>'; html += '<td>'+ times[list[i].toLowerCase()]+ '</td></tr>'; } html += '</table>'; [login to view URL]('table').innerHTML = html; } if ([login to view URL]) { [login to view URL](loadTable); } </script>
Projektin tunnus (ID): 17329237

Tietoa projektista

5 ehdotukset
Etäprojekti
Aktiivinen 6 vuotta sitten

Haluatko ansaita rahaa?

Freelancerin tarjouskilpailun edut

Aseta budjettisi ja aikataulu
Saa maksu työstäsi
Kuvaile ehdotustasi
Rekisteröinti ja töihin tarjoaminen on ilmaista
Myönnetty käyttäjälle:
Käyttäjän avatar
I am a Software Engineer having 6 years of extensive hands-on experience in Object Oriented Analysis & Design (OOAD) and Database Design and Implementation using Agile, UML, .NET Framework, C#, ASP.NET, ASP.NET MVC, T-SQL and SQL Server. Strong believer in project delivery & attaining success in challenging tasks with a passion to explore the new horizons of modern days Technologies & Architectures, Also keen to invest in continuous software process improvement using Agile software Methodologies / Modeling along with standard practices & industry proven software design patterns. + AJAX, HTML5, CSS3, JavaScript, jQuery, AngularJs, JSON + ASP.NET, C#.NET, [login to view URL], Web Forms + MVC 3,4,5 + Entity Framework (EF), LINQ, MVC, 3Tier Architecture, nTiter Architecture + Microsoft SQL Server 2008 R2, 2012, 2014, 2016 + MySql, NoSQL (MongoDb) + Web API + Web Services, Windows Services + Reports (RDLC, SSRS) + Cross browser issues handling and code optimization techniques for high traffic. + UI/UX Development Specialties: + Web Application Development + Desktop Application Development + Responsive Web Applications + eCommerce Solutions + Rich Internet Applications + UI Development + Scrum + Team Management + Software Project Management
$10 USD 0 päivässä
4,8 (7 arvostelua)
3,4
3,4

Tietoja asiakkaasta

Maan KUWAIT lippu
salmiya, Kuwait
4,7
6
Maksutapa vahvistettu
Liittynyt elok. 27, 2015

Asiakkaan vahvistus

Kiitos! Olemme lähettäneet sinulle sähköpostitse linkin, jolla voit lunastaa ilmaisen krediittisi.
Jotain meni pieleen lähetettäessä sähköpostiasi. Yritä uudelleen.
Rekisteröitynyttä käyttäjää Ilmoitettua työtä yhteensä
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Ladataan esikatselua
Lupa myönnetty Geolocation.
Kirjautumisistuntosi on vanhentunut ja sinut on kirjattu ulos. Kirjaudu uudelleen sisään.