LoginLogin RegisterRegister
JUL 27

jQuery Maps Plugin update

started by Jul 27th, 2007 in JQuery

Yesterday I submitted to my SVN a whole new bunch of code which brings the jQuery Maps Plugin up to 1.3a

The new code now provides the user a framework for not only working with Google Maps, but now also Yahoo! maps, however the functionality is currently not as complete. For example, with Yahoo! you cannot yet do the AJAX geocoding or directions search. If anyone has worked with the Yahoo! Maps API, please get in contact, as the API is quite bad, and I just cannot get AJAX geocoding to work (unlike Google, which was a breeze!)

You can check out the latest code here: http://jmaps.googlecode.com

The default way of using the plugin initializes a Google map, like this:

$('#jmap').jmap();

If you want to use a Yahoo! map instead, you simply pass in a provider variable:

$('#jmap').jmap({provider: "yahoo"});

There are also options to pick what type of map you wish to show- "sat" for Satellite, "map" for standard map and the default is "hybrid" for Hybrid map:

$('#jmap').jmap({maptype: "sat"});

To add a point to the map, it's very easy:

$('#jmap').addPoint('55.948286','-3.200111', 'Point1', true, false);

The above code adds a point over Edinburgh, with the Popup text of "Point 1". The point is draggable, but not deletable via double click. The plugin also supports KML and GeoRSS. The below will render a KML file over downtown Chicago:

$('#jmap').addRss('http://mapgadgets.googlepages.com/cta.kml');

For futher options, check out the comments within the code to see what works with what type of map. I have only run testing on FF2 on Kubuntu, so would appreciate any user feedback, as well as comments and suggestions.

Comments 1 Comments
   [SPAM]   Nov 27th, 2007 by Miranda reply to this comment quote & reply to this comment

Interesting contents!All about Chevrolet:restraint systems,engine,compression check,body and frame,diagrams and other.http://chevrolet-cobalt-leases.chevroletsource.info/ chevrolet cobalt leases [url=http://chevrolet-cobalt-leases.chevroletsource.info/]chevrolet cobalt leases[/url] http://ebay-motors-chevrolet-el-camino.chevroletsource.info/map.html ebay motors chevrolet el camino [url=http://ebay-motors-chevrolet-el-camino.chevroletsource.info/map.html]ebay motors chevrolet el camino[/url] http://history-of-the-chevrolet-camaro.chevroletsource.info/map.html history of the chevrolet camaro [url=http://history-of-the-chevrolet-camaro.chevroletsource.info/map.html]history of the chevrolet camaro[/url] http://chevrolet-cobalt-leases.chevroletsource.info/ chevrolet cobalt leases [url=http://chevrolet-cobalt-leases.chevroletsource.info/]chevrolet cobalt leases[/url]



Markdown formatting is supported. HTML tags are not allowed.



Not registered? Sign up here.

About this article

You are currently reading 'jQuery Maps Plugin update', a sticky article posted Jul 27th, 2007 on 'Digital Spaghetti's Dungeon of Code'.
1 comments1 comments
Last comment: Nov 27th, 2007 by Miranda
Tags: , , , , , , , , , , , , , ,
Category: JQuery
Subscribe to the RSS feed for this discussionRSS Comments Feed

Switchboard v1.0.7