OL3-GoogleMaps GSoC 2016

From OSGeo
Jump to navigation Jump to search

Link to OL3-GoogleMaps. This library allows users to add Google Maps layers to an OpenLayers v3 map. To do this, the library replicates the OpenLayers objects to the Google Maps map using the Google Maps API. This makes it very easy for users to use a Google Maps basemap while still working with the OL3 syntax.

The objectives for this summer is to integrate major features to the library such as support for WMS and TMS layers while integrating a few tools that will make future contributions to the library easier for everyone.

Schedule

Header text Header text
23 May - 10 June
  • Add support for WMS layers
13 June - 17 June
  • Add support for TMS/WMTS layers
  • Add support for XYZ layers
  • Start working on a website for the project
20 June - 24 June
  • Complete the website for the library
27 June - 1 July
  • Learn packaging using the node package manager
  • Use it to create a package for the library
4 July - 8 July
  • Learn how to use Travis CI and integrate it to the project
11 July - 15 July
  • Work on the requests being made when layers have no opacity, following the feedback from the ol3 community (patch for ol3)
18 July - 29 July
  • Text labels are not supported natively in Google Maps. Olgm implements its own way of dealing with text labels, but it doesn’t work properly with Google Map’s markers (texts are always on top of all markers). Implement a new way to deal with this issue.
1 August - 5 August
  • Various enhancements (example with a working overview map, Google StreetView)
8 August - 12 August
  • Write a wiki page for deployment
  • Deploy a new release
  • Announce the release on the OL3-dev list
15 August - 19 August
  • Final week: Tidy up code, improve documentation
  • Submit code sample
  • Submit final mentor evaluation


Reports

Week 1

What did you get done this week?

I spent last week working on a bug on the library where vector layers weren’t appearing anymore. For some reason, our custom layer’s parent didn’t dispatch events when its visibility changed. This week, I made a workaround where I dispatch the visible:change event then I call the parent function. It’s not a very clean fix but it allows me to move forward with the project, until we can find a better way to do it. The easiest part of the WMS layers integration is done. It’s now possible create tiled WMS layers with openlayers, and when a google layer is visible, the library renders the WMS layer on it using Google’s own mapping API.

What do you plan on doing next week?

The plan is to work all week on making single-tile WMS layers work with the library. It will be more complicated as it doesn’t seem like the OpenLayers library offers a public function to generate a WMS url for that kind of layer.

Are you blocked on anything?

I still haven’t found the real reason the custom layer of our library doesn’t dispatch events. It happens only when both OL3 and the library are compiled (using google closure). I’m not really stuck on it since I made a temporary workaround.

Week 2

What did you get done this week?

I added support for Image WMS layers. This means users can now add ImageWMS or TileWMS sources to their OL3 map and display them on a Google Maps layer if they choose to. Since the library uses Google Maps’ own API to render them, there’s no synchronisation issues.

What do you plan on doing next week?

With all the new code added, the LayersHerald class, which manages the link between OL3 layers and their Google Maps version, is getting very large. I want to split it into a different file and class for each layer type. Many different test cases need to be tested for WMS layers, to make sure they work with all WMS servers. Update the library to use OpenLayers v3.16 and fix any issues that might arise when that happens. Release a new version of the library

Are you blocked on anything?

Not this week.

Week 3

What did you get done this week?

I refactored the LayersHerald class, it’s now split in several classes. This will make my work for next week easier.

The library now compiles with OpenLayers 3. This fixed the vector layer issue I talked about in my first report.

Upgrade OpenLayers to version 3.16.0.

Publish and announce a new release

What do you plan on doing next week?

Add support for TMS and XYZ layers.

Are you blocked on anything?

I had a hard time compiling the library with OL3, but I’m not blocked on it anymore.

Week 4

What did you get done this week?

I added support for several types of tile layers: TileJSON, TMS, WMTS and XYZ. This came with a refactor of the TileWMS herald, which is now more generic and supports these five source types.

I added new examples for these new layer types

There wasn’t a working automatic script to deploy examples for production, so I fixed the existing one.

I started working on the website for the library.

What do you plan on doing next week?

Finish the website for the library

Solve the issue where the layers’ extent is not respected by Google Maps (requests are sent in invalid coordinates)

Release a new version of OL3GM and announce it on the ol3-dev mailing list

Are you blocked on anything?

I worked a bit on the issue with the invalid requests this week, but I was not able to find a solution yet.

Week 5

What did you get done this week?

I created a website for the library, including instructions to get started and a list of examples: http://mapgears.github.io/ol3-google-maps/

I fixed the issue where some layers would send invalid requests

I released and announced version 0.7 of the library

What do you plan on doing next week?

Next week is dedicated to learn about the Node Package Manager (npm), and to put the library on it. The objective is to be able to install the library with npm by the end of the week.

Are you blocked on anything?

Nope

Week 6

What did you get done this week?

I learned how to use NPM to publish libraries, and I published ol3-google-maps on it. I had to do a minor release to fix something I had forgotten on the first version I published.

Switched from JSHint to ESLint. This is because Openlayers 3 made the change, and the library is an add-on to Openlayers, so it makes sense we’d follow the same code standards.

I started working on a task that was planned for later this summer: fixing text labels overlapping each other. We decided it had a higher priority over the tasks I was supposed to do next.

What do you plan on doing next week?

I plan to work all week on finding a solution for text labels overlapping on markers in Google Maps. This bug happens because Google Maps places the text labels at a different layer than the markers, so setting the zIndex as we would do in OpenLayers is not an option.

Are you blocked on anything?

Nope

Week 7

What did you get done this week?

I worked on a bug where text labels would overlap markers in Google Maps. This happens because Google Maps doesn’t support text labels using its default API, so we use a small library that adds support for these labels by drawing them into canvases onto the Google Maps map.

However, markers are still rendered on tiles, which means text labels are always in front of every marker. To fix this, I made the markers render the same way text labels do, on canvases. It also allows new options such as opacity. It still needs to be reviewed before it’s released though.

What do you plan on doing next week?

Next week is mostly dedicated to automatic testing. I will learn how to use Travis CI and use it to automatically do small tests on new pull requests. This will make it easier for us to test fixes from the community.

I also plan to upgrade OpenLayers 3 to the latest version, and release a new version if everything goes well.

Are you blocked on anything?

Nope.


Student's Biography

Computing experience

I use Windows 10 at home, but I regularly use Ubuntu 14.04 for work and Mac OS X for school-related projects. I’m comfortable with Git and my favorite programming language is Python, although I often work with other languages such as Javascript and C++.

GIS experience as a user

I have to use some GIS libraries for work such as OpenLayers and PostGIS. I have used software such as QGIS in the past to create and debug maps. In my daily life, I often use online map services since I have a very bad sense of direction.

GIS programming

My part-time job is in a company specialised in GIS, but I have also contributed to open-source projects such as OpenLayers and Handsontable in the past, through pull requests.