Thursday, June 23, 2011

gps jquery

jQuery GPS

For people that want to add Google maps to their website, but don't want their website to be bogged down with features they don't need.

Jquery GPS is a lightweight and simple solution to all your Google Map needs.

Add inputs for addresses by simply adding default or custom ID's.

You can use any element to trigger the event! So it doesn't need to be embedded inside a form.

The default ID's make it easy to create an application that will give directions and a highlighted map right on your website!









Thats it! By using the default ID's you have just created a driving directins application for your website!. All thats left is to load the google maps API and initiate the plugin using Jquery.

First In order to use The Google Maps API you must have an API key which you can get Here.

Then you have to load jQuery the google maps API and the plugin:





Because there is NO default ID for what Div tag the MAP will be in we use this initiate the plugin:

As you can see here the div with the id="map" is where the google map will appear.

Thats it! now anyone can get directions from your website.

There are more features like setting where the map first is when it loads, the zoom level, and some other features that would be good for a business. Hopefully I will finish the documentation soon so that you can take advantage of these features!

No comments:

Post a Comment