Find Jobs
Hire Freelancers

Javascript - Save Geolocation Coordinates

$10-30 USD

Finalizat
Data postării: aproape 6 ani în urmă

$10-30 USD

Plata la predare
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>
ID-ul proiectului: 17329237

Despre proiect

5 propuneri
Proiect la distanță
Activ: 6 ani în urmă

Vrei să câștigi bani?

Avantajele de a licita pe platforma Freelancer

Stabilește bugetul și intervalul temporal
Îți primești plata pentru serviciile prestate
Evidențiază-ți propunerea
Te înregistrezi și licitezi gratuit pentru proiecte
Acordat utilizatorului:
Avatarul utilizatorului
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 în 0 zi
4,8 (7 recenzii)
3,4
3,4

Despre client

Steagul KUWAIT
salmiya, Kuwait
4,7
6
Metoda de plată a fost confirmată
Membru din aug. 27, 2015

Verificarea clientului

Mulțumim! Ți-am trimis prin e-mail linkul pe care trebuie să-l accesezi pentru a revendica creditul gratuit.
A apărut o eroare la trimiterea e-mailului. Încearcă din nou.
Utilizatori înregistrați Totalul proiectelor postate
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Se încarcă previzualizarea
S-a oferit permisiunea de depistare a locației.
Ți-a expirat sesiunea pentru conectare sau te-ai deconectat. Conectează-te din nou.