Giter Club home page Giter Club logo

ol3-google-maps's Introduction

OL3-Google-Maps

Build Status

OpenLayers - Google Maps integration library. Create a map using OpenLayers 3 with the possibility to use Google Maps as base map and much more.

Features

Synchronizes:

  • Layers (Google, Vector)
  • Vector features (style, geometry)

Installation

You can install OL3-Google-Maps via npm:

npm install ol3-google-maps --save

Quick start

To use OL3-Google-Maps, first you need to load Google Maps API. It's important to load Google Maps API before OL3-Google-Maps. You also need to use your own Google Maps API key.

<script
  type="text/javascript"
  src="https://maps.googleapis.com/maps/api/js?v=3&key=<YOUR_KEY>">
</script>

Then, load the OL3-Google-Maps script included in the tarball of the version you downloaded, which already includes OpenLayers so you don't need to load OpenLayers too. See the Releases section to download the latest version.

<script type="text/javascript" src="ol3gm.js"></script>

It is recommended to load the CSS file included in there as well.

<link rel="stylesheet" href="ol3gm.css" type="text/css" />

Then, in your existing OpenLayers application, activate OL3-Google-Maps. Here's a simple example:

var center = [-7908084, 6177492];

// This dummy layer tells Google Maps to switch to its default map type
var googleLayer = new olgm.layer.Google();

var map = new ol.Map({
  // use OL3-Google-Maps recommended default interactions
  interactions: olgm.interaction.defaults(),
  layers: [
    googleLayer
  ],
  target: 'map',
  view: new ol.View({
    center: center,
    zoom: 12
  })
});

var olGM = new olgm.OLGoogleMaps({map: map}); // map is the ol.Map instance
olGM.activate();

Live examples

See OL3-Google-Maps in action:

See all other examples at: http://mapgears.github.io/ol3-google-maps/examples/

Developing

See the developing instructions if you want to contribute new features or patches to OL3-Google-Maps.

Note that contributions have to meet some minimum quality requirements in order to be included in the official package, but that's the same as with any mature open source project.

Known Limitations

Please see the known limitations of this library in details.

Bugs and issues

For bugs or feature requests, use the issue tracker

If you need help with the library, use StackOverflow under the ol3-google-maps tag

Our commitment

We, at Mapgears, are definitely committed to continuing to support this project as long as it will make sense to do so. We use it for our own products and for projects with our customers, and will continue to make it evolve and address issues as we go as part of that work.

However, just like with any open source project, its development is driven by the funding we can get through customer projects, so if there are some limitations or issues that are important to you and your organization, we'd be happy to provide you a quote for a support package or for working on those specific limitations, and of course you are also welcome to work on them yourself and contribute the fix.

ol3-google-maps's People

Contributors

adube avatar samuellapointe avatar bampakoa avatar jamieswhiteshirt avatar alexbrault avatar benhutchins avatar jacobo avatar fipp avatar christopheblin avatar sindrma avatar

Watchers

Lucky 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.