当我们在使用statusnet当中的google map时,发现那个放大缩小的level条不见了。这样很不方便使用。加上它其实并不难。打开\plugins\Mapstraction\js\mxn..core.js文件,在原代码:

1
2
3
4
5
6
7
8
9
10
11
12
mxn.register('google', {	
 
Mapstraction: {
 
	init: function(element,api) {		
		var me = this;
		if (GMap2) {
			if (GBrowserIsCompatible()) {
				this.maps[api] = new GMap2(element);
 
				GEvent.addListener(this.maps[api], 'click', function(marker,location) {
...

改变为:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
mxn.register('google', {	
 
Mapstraction: {
 
	init: function(element,api) {		
		var me = this;
		if (GMap2) {
			if (GBrowserIsCompatible()) {
				this.maps[api] = new GMap2(element);
 
				this.maps[api].addControl(new GLargeMapControl());
 
				GEvent.addListener(this.maps[api], 'click', function(marker,location) {
...

转载请注明文章来自糗世界博客

Tags: , , , ,

One Response to “statusnet当中使用google map加缩放条”

  1. liuchen 说道:

    wk 这不是在给我说

    [回复]

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong> <pre lang="" line="" escaped="" highlight="">