bMap - jQuery Plugin

bMap 1.3 is here

The newest version of bMap is designed to work with the latest version of the Google Mapis API V3. This means you don't need an API key to have a map on your site, and you can make mobile applications even easier. Click downloads on the left to get the files. This version is backwards compatible with code written for the older versions of bMap so you can get started immediately.

A google maps jQuery Plugin

The bMap jQuery plugin allows you to quickly and easily add mapping to your website. It has been designed from the beginning to handle lots of markers, lots of layers, and custom marker icons.

The plugin can manage a sidebar for you, one with a list of markers, one with a list of layers. The sidebars can be styled with CSS.

The internal Google object is exposed, so you can continue to use all of the power of the Google Maps API. You can also access the internals of the bMap object.

This is the first version of my first jQuery plugin, so there might be some bugs. So please provide some feedback (I already know that multiple maps on the same page can interfere with each others marker click events, so you are advised to have only one bMap on a page at a time). If you like bMap then show your appreciation by donating anything you can spare (nothing encourages updates more!). Or feel free to look at the code and suggest improvements.

If you use bMap on your site, then let me know at darren.dignam@blocsoft.com

The prerequisites of the plugin are jQuery and google maps. You will need to obtain your own Google API Key.

A quick example:

Example Markup:

<script src="http://ajax.googleapis.com/ajax/libs/jquery/1.3.2/jquery.min.js" type="text/javascript"></script>
<script src="http://maps.google.com/maps?file=api&v=2&key=YOUR_GOOGLE_KEY" type="text/javascript"></script>
<script src="jQuery.bMap.1.2.3.js" type="text/javascript"></script>
<script type="text/javascript">
	
	$(document).ready(function(){ 
		$("#map1").bMap({
			mapZoom: 7				
		});
	});
	
</script>
<div style="width:80%;height:400px;margin:0 auto" id="map1">
</div>

This is almost the simplist example of bMap. We have selected the div with its ID, and set the zoom level. bMap defaults to a fully zoomed out map, centered on the Greenwich Meridian.




Comments:

Zoom level
Mike - 8/12/2010 12:27:10 PM
Hi,

Is it possible to get map to zoom in to maximum as well fitting all markers on the screen?

For example map is zoomed out to 1 and I add two markers, one in France and one in USA, so map zooms as much as possible but not to match, that both markers are seen on screen.

Thanks,
Mike
Zooming Idea
Darren - 8/23/2010 4:03:25 PM
Hi Mike,
I like this idea, and I might add it in time. It is possible and this page explains it:
http://911-need-code-help.blogspot.com/2009/03/zoom-to-fit-all-markers-polylines-or.html
If you do implement this, let us know
Darren
Multiple Markers
Craig - 9/21/2010 2:15:00 AM
How is the performance if you want to add hundreds or thousands of markers (with custom info windows) at any one time?
hgjd
j - 9/21/2010 11:13:56 PM
hjdg
Lots of markers
Darren - 9/22/2010 5:00:21 AM
Craig,
bMap extends google maps. If you look on the google forums you will see quite a lot of debate regarding performance with lots of markers. You could do some tests, but many thousands of markers will have a negative impact. There are techniques you can use to improve the situation - but it is outside the scope of this project.

Darren
Zoom to Markers, Center
Tim Householder - 9/30/2010 8:45:56 AM
Please help get this to work... Dynamically getting marker points from mySQL DB, but cannot figure a way to get to fit to markers and center. Please help. Someone must know how to make it work with bMap.
education
dbernal31 - 10/4/2010 1:38:50 PM
gracias
AJAXMarkers not working in 1.3
J - 10/12/2010 4:51:43 PM
Hi,

I am using bMap 1.3 (latest) with JQuery 1.4.2. Things work well expect for AJAXMarkers operation. Can you post a working example?

J
Parse Error
J - 10/12/2010 5:58:04 PM
http://www.blocsoft.com/bmap/AJAXservice.asp

Just to continue the previous post, I pointed the Serviceurl to the above. Iadded an error handler that prints what the error is. I got an parse error.

Something is not right with version 1.3 and AJAX
bMap 1.3
Darren - 10/13/2010 9:51:20 AM
Hello,
Firstly
http://www.blocsoft.com/bmap/AJAXservice.asp
Uses additional parameters that you are not providing I suspect. Try this page instead:
http://www.blocsoft.com/bmap/example6_AJAX.asp
It will produce a valid result with no parameters.

Secondly - bMap 1.3 is not as developed as the 1.2.x range so if you do find the bug, then do let me know. I will look into this, and I will add an example once I have a proper look

Darren

bMap 1.3
Darren - 10/13/2010 9:52:22 AM
Perhaps if you post a link to your example, I can take a look?

Darren
bMap1.3
J - 10/13/2010 12:48:31 PM
Hi Darren,

The only bug was that I did not know about Same Origin Policy in Firefox. I can confirm that it works great! Sorry for the impulsive posts.

J
download full pack
gecko - 10/22/2010 4:00:42 PM
I will helpful if the download page caome with full working examples
download full pack
gecko - 10/22/2010 4:00:43 PM
I will helpful if the download page come with full working examples
c
pqc - 10/31/2010 3:44:01 AM
map
joginder - 11/14/2010 11:57:14 PM
good
carte du monde
tronchet - 11/17/2010 3:00:44 AM
download
joseph - 12/14/2010 9:28:27 AM
download
Testing your form
William - 2/17/2011 7:04:52 AM
Let's see if this posts!!
ad
ada - 2/19/2011 8:02:26 AM
map
kashyap - 3/9/2011 11:20:30 PM
I want the jar
not working
Mukesh Rane - 4/19/2011 7:36:23 AM
not working
Map not loading
wannabeIT - 6/9/2011 10:51:38 AM
copied code from ur website n added my google API key, downloaded jQuery and saved in root folder. when i tried to run, every things is perfect except Map . in the place where map is supposed to load, i get a blank space. thanks.
Not loading
Darren - 6/11/2011 7:30:44 PM
Can you post a link to the page with the broken map? Perhaps then someone can help...
IE error
grindking - 8/9/2011 8:35:57 AM
Even on your page there's an error after the click-event (markers).

Think Problem is here:
var h = $("
IE 7 error
grindking - 8/9/2011 8:36:26 AM
Even on your page there's an error after the click-event (markers).

Think Problem is here:
var h = $("
Geocoding
Eugene - 10/12/2011 10:34:03 AM
Hi guys! Could you please explain how can I post/get geocoding requests with your plugin? Thank you.
Good Job|
Rox - 12/3/2011 1:05:32 AM
Just dropping by to say thank you!
good work but there erros
astaza - 3/6/2012 8:16:51 AM
hi, nice work
but there are some errors in ie7
look here http://astaza.com/
Very good!
Terry - 3/23/2012 8:55:14 PM
Thank you for making it easier to work with gMaps on mobile devices. Digging in and figuring it all out now.

BUT, would you please share with me how you get the popup / overlay window for the download link? That is very cool.

Can email me if you have the time.

Terry
Very good!
Terry - 3/29/2012 9:21:21 PM
Thank you for making it easier to work with gMaps on mobile devices. Digging in and figuring it all out now.

BUT, would you please share with me how you get the popup / overlay window for the download link? That is very cool.

Can email me if you have the time.

Terry
Bmap download
Bobby - 4/30/2012 2:30:18 PM
Distance?
Niklas - 5/14/2012 3:25:18 PM
Nice script! But how to display distance from a given point?
text
haranath - 12/4/2012 3:14:28 AM
,dsldlkldsddsdsdsdsdsd
school
stbramanian - 12/9/2012 1:16:21 AM
teaching to students

 (*required)
 (*private)
 (*required)
 
© 2010 blocsoft.com All Rights Reserved. GPL License Privacy Policy Contact