A. Mapping enhancements - Gwulo in 2016 | Gwulo: Old Hong Kong
Pre-order the new Gwulo book today to get 
special pricefree shippingsigned copies, and a free sample
Details and how to order

A. Mapping enhancements - Gwulo in 2016

Here are my plans for this work. Ideas and feedback welcome. Also if you see a feature that you don't use because you're not sure how it works, let me know and I'll explain more about how and why I use it.

1. Current features that work well

These are the maps I use regularly, and expect to have available after the upgrade.

1.1 Map of all Places. I use this a lot. Its problem is that as the number of Places has grown, it has got very slow to load.

1.2 Map of all Places with a given tag. The example link is a map of Pillboxes and Lyon Lights around Hong Kong island. It's a useful tool whenever there is more than a handful of Places of a given type (eg pillbox / cinema / police station / etc), and you want to see how they are distributed.

1.3 Colour-coded markers. In both the maps shown above, the colour of the marker shows whether the Place is Demolished / Ruined / In-use. This is helpful when there are several generations of a building at the same site, as the colour helps differentiate them.

1.4 Map of Places shown on a scanned 1924 paper map. I've taken several scanned maps and overlaid them on modern maps so the streets and buildings are aligned. It is very useful when researching buildings that stood around the same time as the map. This map doesn't currently use colour-coded markers.

1.5 Location of a Place on modern map. Each Place shows its location on a modern map. This map doesn't currently use colour-coded markers.

1.6 Location of a Place on a 1924 paper map. This shows the same Place's location on a 1924 Paper map of Central and Western Districts. I use this less often, but it is very helpful when researching old buildings.

2. Current features that don't work well

2.1 Animation showing the Places built and demolished, 1840-2016. I built this in 2011, but it hasn't worked since the big upgrade in 2014. I haven't missed it, so though it is fun to watch it isn't worth the time to maintain it. I'll remove this.

2.2 Create simple marked-up maps for discussions. This is a handy tool that lets you quickly draw a map, add a few markers / lines / outlines, and include the map in your text / commment.The problem is that though it has been part of Gwulo for several years it hasn't worked reliably.

3. New features

3.1 Define an area for a Place. When creating a Place, allow the user to choose the location by clicking to add a marker (the way it currently works) or by drawing an area / polygon. For a simple building, the current marker works well. But for larger sites, the marker isn't so good. eg I've wanted to document Hong Kong's reclamations over the years. For these I want to draw the area of the reclamation and have it display on the maps, not just show a simple marker. Other examples where areas would work well include Lots of land, military barracks, Stanley internment camp, etc

3.2 Is there any feature you'd like to add that you think we'd use on a regular basis? A good example is a feature that you use regularly on another site and miss on Gwulo.

4. Work to be done

4.1 Prepare outline of work. [COMPLETE: This post]

4.1 Meet with person working with historic maps of Hong Kong to share ideas and discuss cooperation [COMPLETE]

4.3 Set up local test server with copy of Gwulo.com, then use it for the following work. [COMPLETE]

4.4 Upgrade modules and library to the current versions. [COMPLETE: I initially planned to upgrade to the current versions of OpenLayers, but found there were features that weren't available yet in the new version. I've switched to use Leaflet instead.]

4.5 Rebuild maps in 1.1-1.6 so we have same functionality, but using the current versions of software

1.1 Map of all Places. [COMPLETE]

1.2 Map of all Places with a given tag. The example link is a map of Pillboxes and Lyon Lights around Hong Kong island. It's a useful tool whenever there is more than a handful of Places of a given type (eg pillbox / cinema / police station / etc), and you want to see how they are distributed. [COMPLETE]

1.3 Colour-coded markers. In both the maps shown above, the colour of the marker shows whether the Place is Demolished / Ruined / In-use. This is helpful when there are several generations of a building at the same site, as the colour helps differentiate them. [COMPLETE]

1.4 Map of Places shown on a scanned 1924 paper map. I've taken several scanned maps and overlaid them on modern maps so the streets and buildings are aligned. It is very useful when researching buildings that stood around the same time as the map. This map doesn't currently use colour-coded markers. [COMPLETE.]

1.5 Location of a Place on modern map. Each Place shows its location on a modern map. This map doesn't currently use colour-coded markers. [COMPLETE]

1.6 Location of a Place on a 1924 paper map. This shows the same Place's location on a 1924 Paper map of Central and Western Districts. I use this less often, but it is very helpful when researching old buildings. [NO LONGER NEEDED - ALL MAPS SHOW OVERLAYS NOW.]

4.6 Speed up the "1.1 Map of all Places". In a test just now it took appx 25 seconds to load, which means that any new user is unlikely to wait long enough to see it. I'll aim to speed it up ten times, so instead it takes 2-3 seconds to load. I think it will need use of AJAX to load the popup contents so the initial map load is faster, but I'll look for easier solutions first. [COMPLETE: I haven't had to use AJAX yet, but will keep that in hand for when the map next slows down and needs another performance boost.]

4.7 Repeat 4.4 - 4.6 on the live server. [COMPLETE]

4.8 Use consistent, colour-coded markers on all maps. [COMPLETE]

4.9 Remove the animated map [COMPLETE]

4.10 Investigate fixing "2.2 Create simple marked-up maps for discussions". Look to see if the problems are easily fixed, if there is another way to achieve the same feature, or if we should just remove the feature. [POSTPONED]

4.11 Add the "3.1 Define an area for a Place." feature. [POSTPONED]

4.12 Add a new scanned paper map as an overlay. Andrew Suddaby sent a good map of Kowloon from the 1950s. [COMPLETE]

4.13 For each of the scanned paper maps, add them as tabs on each Place. So repeat "1.6 Location of a Place on a 1924 paper map." for each map we have. [NO LONGER NEEDED - ALL MAPS SHOW OVERLAYS NOW.]

4.14 Add state of map to url so it can be copied to others. [COMPLETE]

4.15 Enable user to see a Place's GPS coordinates.  [POSTPONED]

4.16 Add the 1905 map (http://gwulo.com/atom/24022) as a layer. [SCHEDULED]

5. For the future

I'll note down these wishlist items while they are fresh in my mind, but I don't expect to work on them in 2016.

  1. On the map for a Place, also show markers of nearby buildings.
  2. Have a map of Places, that when you click a Place's Marker you're shown all the photos we have for that Place. (You won't swicth to a new page, the screen will be in two parts, map, and photos. Click on a marker on the map and the photos part updates to show photos of that building.
  3. Allow user to change opacity of paper-map overlays. [COMPLETED]
  4. Allow user to select which Places to view: Demolished / Ruin / In use / Unknown
  5. Display the HK Government's GeoInfo map as the background layer to our maps.
  6. For mobile users with location-enabled devices, have a "What's near me" map. So you could be out on the streets, see something interesting, visit this page and see what information Gwulo has about it. Supplement with QRCodes for people without location. 
  7. Allow users to easily add geo-referenced images and maps. Not a full tile-based, but a simple image with specification of locations for the 4 corners.
Forum: 

Hi David,

I just bumped into the old news of Google Earth Pro had been free since last January.  Maybe it's worth finding out if there are any mapping API compatible with the platform in use which would utilize the Google Earth Pro features.

Thanks & Best Regards,

T

Hi Thomas,

Thanks, I didn't know that. I've just downloaded the free copy to upgrade my old non-Pro version.

I don't think there will be much overlap between this work and Google Earth. I'll be working on a mix of php for the web-server and javascript libraries for the client, whereas Google Earth is a traditional Windows program. Are there any parts of Google Earth you can see might be helpful?

Regards, David

Hi David,

I have not started exploring yet.  At a glance the resolution of Google Earth Pro appeared to be a bit higher than the its lesser sibling.  The menu items look very much similar, if not the same.  Might have to find something to drill down into some dtails before coming up with something.

Oh, the Pro version seem to support life GPS feeds if you connect a compatible one to your computer, or if your notebook computer happen to have a built-in GPS chip.  My Thinkpad has such a chip but it seem to have some COM port conflict after I re-install Windows 7 on a newly swapped in SSD.  I will try it after fixing the COM port conflict.

More later.

T

I've made two changes today.

  1. Take () out from layer names. So the default layer is now "Map by ESRI" instead of "Map (ESRI)". The problem with the () is that they don't convert to links properly when we paste a url into text.
  2. Disabled the previous OpenLayer mapping, as we're now using Leaflet.

I think I've caught all the pages that these two changes affect, but if you see any pages that look like they're missing a map, or that have stopped working, please leave a comment to let me know.

There are a few small problems still remaining. I'll document them here but as none of them stop the maps from working I'll leave them for now:

  1. Map doesn't display correctly when coming out of fullscreen on Win7 Chrome browser. Workaround is to resize your browser or hit F5 to refresh, both of which show the map correctly again.
  2. If we don't load all maps at page-load, the map will load slightly faster.
  3. Check the bounds for tile layers are working correctly (why are there 404 errors for missing tiles, when bounds are set?)

I've got the maps to a state that I'm happy with, so I'll now switch attention to improving handling of images and other media.