Find Jobs
Hire Freelancers

Simple add Geolocation through GET Function

$10-30 USD

Terminado
Publicado hace casi 9 años

$10-30 USD

Pagado a la entrega
I have everything working but because Im new at this I just need a few lines of code added to make it work. Basically i just need to add a $Get function to below line that will send the latitude, longitude, street,city,state,country to a page that will post to my database... As I mention the geolocation aspect already works i just need the post feature. I included the zip file it does not have to be written from scratch so i posted it as a small project //use array to determine how it goes into DOM, I think you could use Data Attributes: [login to view URL] var selector = []; [login to view URL] = function() { //push in one or multiple IDs depending if its one address field or multiple [login to view URL]("address-line-1","city","state","zip"); //go get the location getLocation(); }; function putInDom(address){ if([login to view URL] == 1){ //one field for address var field = [login to view URL](selector[0]); [login to view URL] = address; } else { //multiple fields var street = [login to view URL](selector[0]); var city = [login to view URL](selector[1]); var state = [login to view URL](selector[2]); var zip = [login to view URL](selector[3]); var a = [login to view URL](","); [login to view URL] = a[0].trim(); [login to view URL] = a[1].trim(); [login to view URL] = a[2].trim().split(" ")[0]; [login to view URL] = a[2].trim().split(" ")[1]; } // $.get("[login to view URL]", { url:"EDMStaff", town:"Ducktown" }); //clear array selector = []; } function getLocation(){ if ([login to view URL]){ //remember this is async behavior, the browser does not have access to your locations right away but it does not want to stop executing code [login to view URL](getAddress); } else{ info.innerHTML="Geolocation is not supported by this browser."; } } function getAddress(position){ putInDom(address); getLocation(); var lat = [login to view URL]; var lon = [login to view URL]; //Google does not allow Cross Domain Access so let's use a Proxy: [login to view URL] var url = '[login to view URL]'+city+','+lon+'&sensor=true'; //make the Ajax request var xhr = new XMLHttpRequest(); [login to view URL]("GET", url); [login to view URL] = function() { //if we make a successful request and it returns an address if(this.status==200 && [login to view URL]([login to view URL]).[login to view URL] > 0){ //get formatted address from [login to view URL] var result = [login to view URL]([login to view URL]).[login to view URL][0].formatted_address; putInDom(result); } else { //send some general error [login to view URL] = "Could not find your location."; } } [login to view URL](); }
ID del proyecto: 7811218

Información sobre el proyecto

7 propuestas
Proyecto remoto
Activo hace 9 años

¿Buscas ganar dinero?

Beneficios de presentar ofertas en Freelancer

Fija tu plazo y presupuesto
Cobra por tu trabajo
Describe tu propuesta
Es gratis registrarse y presentar ofertas en los trabajos
Adjudicado a:
Avatar del usuario
A proposal has not yet been provided
$25 USD en 1 día
5,0 (9 comentarios)
3,7
3,7
7 freelancers están ofertando un promedio de $25 USD por este trabajo
Avatar del usuario
Hello man, I'm already coded this function, so if you want get it ASAP just award this project for me. Thanks you
$30 USD en 1 día
5,0 (4 comentarios)
2,8
2,8
Avatar del usuario
I have checked the requirement you have mentioned in the job post. First of I am from India, So may be this proposal will be ignored. You can first make a chat with us and you can decide later. Please note that, we have worked on the popular frameworks such as Laravel, Codginiter, CakePHP etc. We have worked on the latest version in these frameworks. So we have experienced in REST API, Bootstrap, Linux, MySql, Jquery etc. So please have a quick chat with us and you can decide later. You can also check our portfolios mentioned in the profile. Let me introduce our profile, please note that, if your are checking our rating, currently we haven't any rating. Because our work from other networks We are a group of Web & Mobile developers having expertise in Open Source technologies such as PHP, Wordpress, Drupal, Mobile Apps & Game Development, etc. As per the requirement mentioned, I am interested to work with you. Our core competency lies in complete end-end management of a new website development project, and we are seeking opportunities to build websites from the ground up for you or your business. We have experience in the following areas: Codeigniter, Yii, Laravel, Magento, Opencart, ZenCart, NodeJs, MySql, MongoDb, jQuery, Facebook API, Twitter API, Google API, Paypal, CyberSource, Braintree, CCAvenue I think the best way to demonstrate our expertise is to show you our work with reference to your requirement. We would like to hear your requirement so that we can anal
$25 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
Hello, I am working in well know IT mnc company and i am working in java script so i am very helpful to you to do your task. It just 3 to 4 hrs task may be it will take less time also.
$18 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
I am a 38 years analist/programmer with 18 years of experience. Have worked on enterprises projects for financial companies and for general purposes for web. I know technologies like Python, ASP.NET, PHP and more. Relational and non relational databases. Microsoft MCP certified. I have worked on UX Systems for Hewllet Packard too.
$25 USD en 1 día
0,0 (0 comentarios)
0,0
0,0
Avatar del usuario
Hi, I have 10 years of experience using ASP, javascript and SQL Server. Contact me, so I can create the function to send the values to your database. Regards, Luciano.
$30 USD en 1 día
0,0 (0 comentarios)
0,0
0,0

Sobre este cliente

Bandera de UNITED STATES
port orange, United States
5,0
25
Forma de pago verificada
Miembro desde jun 5, 2015

Verificación del cliente

¡Gracias! Te hemos enviado un enlace para reclamar tu crédito gratuito.
Algo salió mal al enviar tu correo electrónico. Por favor, intenta de nuevo.
Usuarios registrados Total de empleos publicados
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Cargando visualización previa
Permiso concedido para Geolocalización.
Tu sesión de acceso ha expirado y has sido desconectado. Por favor, inica sesión nuevamente.