Creating the Web Client to Consume Your Geo-Location Service

wadusay

Rising Star
BGOL Investor
Creating the Web Client to Consume Your Geo-Location Service

yourworldyourhustle.jpg


In part three of our geo-location example, we are going to show how to create the web client for the geo-location database and web service hosted on a $5USD/month GoDaddy account. By creating a geo-location database and web service in the previous example, you can create a basic building block to generate all types of geo-location based web hustles to target brothas and sistas or even create bigger global hustles.

Think about all the kinds of side hustles you can create with a $5USD/month geo-location hustle. So let’s look at a couple of scenarios here:

Food Truck Finder. Create a food truck tracking service where foodie ninjas sign up through their mobile device. So when a food truck is in the area, if the food truck wants to advertise their current location to the people signed up to your food truck finder service, they can pay you $10 via PayPal on your web site. Once the food truck pay, when a foodie ninja check their location, that food truck should return on the listing if it is nearby. You set this hustle up in 15 major cities getting $10 here and there all day long at work while your co-workers talk that MLM and going to get a free Bentley crap.

Nearby Business Offers. When brothas and sistas come to Atlanta, they really

don’t know where the real spots at and where to go. We can say that for a lot of cities when brothas and sistas get in town, don’t know where to go. Well, that’s where your listing come in where you charge businesses to advertise and you insert their latitude/longitude and then promote offers. Businesses such as night clubs, restaurants, and entertainment venues will always need new people coming in. Again, they use PayPal to pay you, you charge them $100/month and get 200 businesses in multiple cities and you making $20,000/month on top of your job looking at your co-workers listening to online streaming Black radio. Then you realize you can start going worldwide and up your revenue to $200,000 a month still working your day job.

Treasure Hunt and War Driving. This is an old popular GPS game similar to that Amazing Race game. For example, you get an expensive handbag and put it at a park. It is Saturday morning and you send a list out to all of the participants who paid $5 entry fee to search for the handbag. You send out a bunch of GPS coordinates for them to run to and get clues to the next destination and eventually the first person who ends up at the winning location gets the handbag. This is your weekend morning side hustle with 50 couples running around and you made $250 on the weekend money to blow at the mall and Red Lobster while other cats are still in bed sleeping.

Obviously, there are other hustles you can create such as the airport hustle or run a QR code hustle that gets the current location and offer deals. You can setup this hustle to be in Tokyo, Paris or London and you living in Dayton, Ohio

and ish! All of that on some $5USD/month GoDaddy hustle.

Getting a Current Location

In HTML5, which is supported on both iOS and the latest Android mobile devices, there is a straightforward snippet of JavaScript code that will retrieve your latitude and longitude. Once you have that latitude and longitude, you create the URL in as a REST call in the last example I created and call the web service and get an XML back of the nearest locations that you parse and display.

For the HTML code this is what I think it should look like:

Code:
<!DOCTYPE html>
<html>
<head>
<script src="jquery-1.7.2.min.js"></script>
<script type="text/javascript">
jQuery(window).ready(function () {
jQuery("#btnGetGeo").click(initiate_geolocation);
});

$.ajaxSetup({
cache: false
});
var ajax_load = "<img src='img/load.gif' alt='loading...' />";

function initiate_geolocation() {
navigator.geolocation.getCurrentPosition(handle_geolocation_query, handle_errors);
}

function handle_errors(error) {
switch (error.code) {
case error.PERMISSION_DENIED: alert("user did not share geolocation data");
break;

case error.POSITION_UNAVAILABLE: alert("could not detect current position");
break;

case error.TIMEOUT: alert("retrieving position timed out");
break;

default: alert("unknown error");
break;

}
}

function handle_geolocation_query(position) {
jQuery("#txtLocation").val('Lat: ' + position.coords.latitude + ' ' + 'Lon: ' + position.coords.longitude);
var loadUrl = 'geolocation.aspx?action=getnearest&latitude=' + position.coords.latitude + '&longitude=' + position.coords.longitude;
jQuery("#htmlResult").html(ajax_load).load(loadUrl);

}
</script>
</head>
<body>
<div><button id="btnGetGeo" >Find my location</button></div>
<div><input id="txtLocation" style="width:400px;" /></div>
<div id="htmlResult"></div>
</body>
</html>

^^^^^ NOTE: If you want to know what the code looks like just hit "Quote" on this post and look in between the
Code:
 tags.[/SIZE][/B] 



I copy/paste this stuff off the web in about 15 minutes, actually tested this and it works as expected on the XML web service that I showed you. I’m not going to create this raw example as a demo because I want a better looking demo and that’s where you cats need to tell me what to demonstrate. Do you want me to create a food truck finder example, a business offer example – I won’t do the wardriving stuff, okay because that is too much right now. Or you want me to do the airport hustle and display a QR code that you scan from the web page and get the user current location and show what’s around them?

If you look at the code, you should notice the htmlResult is where I display the HTML data list of nearby offers that is stored in the geolocation database. Now I can display a list of food trucks in HTML instead of XML in the code but for the Invisible Pop-Up Store, we can get the XML data because we will also be using other features to determine how to display the object in their mobile device. We still working on that but I know I made a lot of sideline cats mad because they see we about it and how simple it is to do for our people and help them hustle on $5USD/month.

See, now you brothas and sistas can go setup a cheap web site, setup your PayPal account, create some local offer site for brothas and sistas using mobile devices and tablets. You can go to the strip clubs and night clubs and other venues and demonstrate on your cheap $100 Android tablet how the local feature work and how people will learn about your company. You can grab one of those cheap .info domain and give it a unique name since no one use those domains for your address. You can do all of that ish before the weekend and start hustling for the summer after Memorial Day while other cats just read this blog and do nothing afterwards.

I already know you going to get nutty and start geo-locating ish in Africa, Latin America, Southeast Asia, Middle East and Europe and North America and start taking over worldwide spots catering to multiple demographics and businesses and in different languages. You going to start doing local college offers in college towns and ish, you going to hit up the military installations, you going to hit up tourist attractions and keep collecting deposits from your PayPal while at work and other cats are still looking at these other ignorant stuff on the Internet.
So the last article about this geo-location stuff will be a working web example, just need to tell me how to design it.



[URL="http://dreamandhustle.com/2012/05/creating-the-web-client-to-consume-your-geo-location-service/"][SIZE="5"][B]http://dreamandhustle.com/2012/05/creating-the-web-client-to-consume-your-geo-location-service/[/B][/SIZE][/URL]
 
Back
Top