ol3-google-maps

WebJar for ol3-google-maps

License

License

MIT
Categories

Categories

Github Development Tools Version Controls
GroupId

GroupId

org.webjars.npm
ArtifactId

ArtifactId

github-com-mapgears-ol3-google-maps
Last Version

Last Version

0.20.0
Release Date

Release Date

Type

Type

jar
Description

Description

ol3-google-maps
WebJar for ol3-google-maps
Project URL

Project URL

http://webjars.org
Source Code Management

Source Code Management

https://github.com/mapgears/ol3-google-maps

Download github-com-mapgears-ol3-google-maps

How to add to project

<!-- https://jarcasting.com/artifacts/org.webjars.npm/github-com-mapgears-ol3-google-maps/ -->
<dependency>
    <groupId>org.webjars.npm</groupId>
    <artifactId>github-com-mapgears-ol3-google-maps</artifactId>
    <version>0.20.0</version>
</dependency>
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-mapgears-ol3-google-maps/
implementation 'org.webjars.npm:github-com-mapgears-ol3-google-maps:0.20.0'
// https://jarcasting.com/artifacts/org.webjars.npm/github-com-mapgears-ol3-google-maps/
implementation ("org.webjars.npm:github-com-mapgears-ol3-google-maps:0.20.0")
'org.webjars.npm:github-com-mapgears-ol3-google-maps:jar:0.20.0'
<dependency org="org.webjars.npm" name="github-com-mapgears-ol3-google-maps" rev="0.20.0">
  <artifact name="github-com-mapgears-ol3-google-maps" type="jar" />
</dependency>
@Grapes(
@Grab(group='org.webjars.npm', module='github-com-mapgears-ol3-google-maps', version='0.20.0')
)
libraryDependencies += "org.webjars.npm" % "github-com-mapgears-ol3-google-maps" % "0.20.0"
[org.webjars.npm/github-com-mapgears-ol3-google-maps "0.20.0"]

Dependencies

compile (2)

Group / Artifact Type Version
org.webjars.npm : async jar [0.2.10,0.3)
org.webjars.npm : htmlparser2 jar [3.7.1,3.8)

Project Modules

There are no modules declared in this project.

OL-Google-Maps

Build Status

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

Features

Synchronizes:

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

Getting started

For use with webpack, Rollup, Browserify, or other module bundlers, install the olgm package.

npm install olgm

You must also install the ol package.

To use OL-Google-Maps, first you need to load Google Maps API. It's important to load Google Maps API before OL-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>

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:

import Map from 'ol/Map.js';
import GoogleLayer from 'olgm/layer/Google.js';
import {defaults} from 'olgm/interaction.js';
import OLGoogleMaps from 'olgm/OLGoogleMaps.js';
import View from 'ol/View';

var center = [-7908084, 6177492];

// This dummy layer tells Google Maps to switch to its default map type
const googleLayer = new GoogleLayer();

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

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

Live examples

See the following example for more detail on bundling OL3-Google-Maps with your application:

See OL3-Google-Maps in action (version v0.20.0):

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 or if you want to see the examples in action using the latest version.

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.

org.webjars.npm

Mapgears

Versions

Version
0.20.0