Giter Site home page Giter Site logo

panmap's Introduction

PANMAP - jQuery plugin for create, save and load overlays on google maps

##Demo

http://vvpolyakov.github.com/panmap/

##Usage

Load scripts

    <script src="http://maps.googleapis.com/maps/api/js?sensor=false&libraries=drawing"></script>
    <script src="http://code.jquery.com/jquery-1.8.2.min.js"></script>
    <script src="PATH_TO_JS/jquery.panmap.js"></script>

###IMPORTANT! add library to google maps API! libraries=drawing

Create an instance

    $("target").panmap({
        height: "300px",
        width: "100%",
        change: function(object) {}
        data: {
            center:{lat:50.11111, lng:20.222222, zoom: 10},
            objects:[
        	{type:"marker", lat:50.11112, lng: ...},
        	{type:"polyline", ...},
        	etc...
            ]
        }
    });

Make editable true

    $("target").panmap("edit",true);

Make editable false

    $("target").panmap("edit",false);

Get value

    $("target").panmap("value");

Save to JSON

    MYJSON = $.toJSON($("target").panmap("value"));

Load from JSON

    $("target").panmap({
	data: $.evalJSON(MYJSON);
    });

panmap's People

Contributors

vvpolyakov avatar

Watchers

James Cloos avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.