[Baidu Map] Multizmap modified use;

Source: Internet
Author: User

Multizmap Modification Instructions

Multizmap is based on the Baidu Map API encapsulation of some common function class library, mainly in the prototype way, and implemented some auxiliary functions, such as adding Marker function, event management, etc.

Previous version: Http://www.cnblogs.com/editor/category/591379.html

This new marker add function, support chain operation, and modify the printing function and ranging function;

Function description

1. Create a map

var New Multizmap ({                ' container ',                ' mapId '            });

2. Marker operation

var new multimap.getpoint (' 118.523826,24.929245 '); var New Multimap.marker (pot)                        . SetLabel (' title ', {})                            . SetIcon ({img:' xxxx.gif ', width:22, height:22 }); Multimap.panto (pot) ;

The Mke can return
itself get () method
Marker Label name: Getlabel ();
Icon method: GetIcon (); Returns the JSON data for the picture, width, height;

3. Printing function;

Print:function(opts) {/*var pot = Self.mapObj.getCenter ();                        var zoom = Self.mapObj.getZoom (); Opts.width = Opts.width | |            700; Opts.height = Opts.height | |                        600; window.open (Opts.url + '? lng= ' +pot.lng+ ' &lat= ' +pot.lat+ ' &zoom= ' +zoom, ' Print map ', "height=" +opts.height+ ", Width= "+opts.width+", top=10, Left=10,toolbar=yes, Menubar=no, Scrollbars=yes, Resizable=yes, Location=no, Status=no "            ); */                        varwidth = $ (' # ' +self.container). width (); varHeight = $ (' # ' +self.container). Height (); varPrtfull =NewSelf . Xfullmap ({width:width, height:height, Fullfunc:function() {                                    }            }); varMidx =MultiZMap.dom.getMaxzIndex ();                        Prtfull.tofull (Self.mapObj.getCenter (), MIDX);                        Window.print (); SetTimeout (function() {Prtfull.toorigi (); }, 1000);}

This feature is under Tools:

method of Use;

Print full screen first, after printing will automatically back to restore the interface state;

SOURCE download

SOURCE Download: Http://files.cnblogs.com/editor/MultiZMap3.rar

The project source code using Springmvc+maven build, Src/main/webapps is the script source code;

[Baidu Map] Multizmap modified use;

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.