The All New Map Panel...

Started by Mario, March 25, 2017, 08:48:42 PM

Previous topic - Next topic

Mario

Yesterday I started the work on the new Map Panel.

Of course the map panel is implemented as a regular IMatch app, using services provided by IMatch and the IMWS embedded in IMatch 2017. Yeah, this stuff is that powerful!

I will implement support for OpenStreetMap and Bing Maps using the popular OpenLayers 3 toolkit. IMatch 5 uses OpenLayers 2, which is a bit dated by now and makes problems here and there.

The problem with OpenLayers 3 is that they no longer support Google Maps. The programmers were feed up with the ever-changing nature of Google Maps, the lack of support from Google, political issues, legals and whatnot. Shame, really.

For me this means that I have to implement two separate tacks internally, one based on OpenLayers and another one directly working with the Google Maps interfaces.

I want to offer my users choices.
Not everybody is happy with the all-powerful data kraken Google (I make sure my code does not even connect to Google unless you have enabled Google Maps!).
OpenStreetMap has data not available in any of the other maps, especially if you hike or bike.
And Bing Maps has some advantages in other areas.

Luckily I've studied the Google Maps interfaces already for IMatch Anywhere WebViewer and can now reuse that hard-earned know-how. This saves me many days.

The new Map panel will look different and will be responsive - which means it works in small docked panels and full screen - from 1024 pixels to 8K monitors  ;D

Here are two screen shots:

This is how the map panel looks, with the Configure menu open:



To search for a location or to position to a specific coordinate, the new Map Panel uses an overlay. This leaves more screen space for the map itself:

-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

BanjoTom

This looks great!  As a frequent user of the Map panel, I can hardly wait to see these changes implemented!   
— Tom, in Lexington, Kentucky, USA

Mario

Had a serious setback today  :-X  :-\

The Windows "web browser control" which is used by IMatch any many other programs is based on Internet Explorer (11). There is currently nothing from Microsoft which would allow programmers to "embed" Microsoft Edge in applications - which would be great because it is newer and faster.

Anyway, after adding the code to use OpenLayers, I noticed that i could not click & pan the map. And it was also very slow.
After digging for a long time (!) I've found out that I had to add several registry keys (!) for IMatch so the web browser control changed its behavior to a more modern approach. Especially for keyboard / mouse and gesture handling. OpenLayers requires that - and probably many other tools as well.

Unfortunately, as soon as I got OpenLayers etc. working in the browser embedded in IMatch, I noticed that the menus and drop-down lists in toolbars no longer worked. The selected item is no longer highlighted, selection in toolbar list boxes is only possible via keyboard not mouse etc. Disaster.

I have no idea why the user interface toolkit should behave different when I enable a certain setting for the web browser control - local to my app and only the actual browser window.

I've searched the source code of the user interfaced toolkit but found no reference to these registry settings or the web browser control.
So I wrote the vendor. Unfortunately, they have a response time from weeks to never these days...

I'm afraid this is one of the final drops that will cause be to change plans and implement something I had planned for mid of this year or slightly later. But this would make me independent from the Microsoft web browser control and give me a much faster and modern browser for IMatch. It's just awfully complicated... :o
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

lnh

Also looking forward to the new map panel.

I know it wouldn't be your near term priority, but within the planning for later releases of IMatch 2017 do you plan to put a  graphical user interface in front of the ECP capability to geotag photos from a GPS track as described in:

https://www.photools.com/community/index.php?topic=5797.0

which uses ECP to accomplish this task?

Mario

This is currently not on my road map for the 2017.

There are many applications out there which can read track logs,
ExifTool can read the track log and copy the GPS data into the corresponding files.
Simple command line operation, ExifTool does the rest.

IMatch picks up the new coordinates automatically.

The feature could also be implemented as an app for IMatch 2017  ;D
The tools are there already.

Currently my main goal is to get IMatch 2017 out. Then I will re-evaluate other FRs.
If there is already a feature request for this, you can bump it.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

So, back on track again. Integration of the awesome Chromium Browser is 99% complete. I can now continue to work on the new Map Panel.
Since I can reuse lots of code I have written for the Map Layout in IMatch Anywhere Web Viewer, I make progress fast.

Here is a quick impression of the current state (click to zoom):



For this screen shot I have enabled the data overlay to show the file names, and also switched on the option to display images instead of placemarks.
The new info popups also work nicely. Now I need to figure out how to indicate the focused file and the 'marker' item (these are concepts yet not implemented in IMatch WebViewer).

Next will be implementing it all again with Google Maps. Since OpenLayers no longer supports Google Maps (Google's problem), I need to implement everything twice  ;)  :-X
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

BanjoTom

— Tom, in Lexington, Kentucky, USA

stonecherub

I'm sort of stuck with Google Earth in my work and web site. My field area is in Mexico, 15 km from the US border. Bing images are higher resolution but Bing is violently America-First!, putting a green overlay over imagery in Mexico that covers my volcano. GE imagery is old (2006) but it's all I have. I appreciate you wanting to have a better map panel but I really need you to keep the old one in IMatch as an alternative.

Mario

Quotea better map panel but I really need you to keep the old one in IMatch as an alternative.

Why?
The new one can do everything the old one did, just more and better, Google Maps will be available in the next generation of IMatch.
As I explained above, giving users the choice between OpenStreetMap (great for hikers and bikers), Bing and Google has become just more of a struggle.

MapQuest discontinued their free service.
Google and their constant API changes and political issues angered the OpenLayers developers and they dropped support for Google.

This means that I now can use OpenLayers for Bing, OpenStreetMap etc. but have to develop everything separately for Google Maps - two separate development tracks. For the user this is only visible because the dialog boxes and icons look different in Google than for Bing/OSM. But that's all. Everything else works the same. It's just a lot more work for me.

People want Google. I understand that. Many (young) people don't even know anywhere that there are other search engines or map providers...  :(
Or what it really means when you use the 'free' services provided by Google.

This is why I don't want to hard-code IMatch to use only one geoservice (many applications vendors do, because it's simpler). I want to offer alternatives to my user base.
If somebody does not want to share their information with Google, IMatch offers alternatives. At least here in Europe, people are becoming more sensitive about privacy and the massive amounts of data Google, Facebook et. al. collect about us. And what or what they don't do with it.

Depending on where you live, Google, Bing or the other map services may be forced by law to hide or blank out certain areas or limit the resolution in certain countries. Maybe Google and Bing will be forced to white out Mexico entirely in the future - who knows  ??? Then IMatch users from Mexico can still use OpenStreetMap in IMatch - or route their traffic through a proxy server.

In short: The main implementation of the Map App in IMatch 2017 is based on the open source and flexible OpenLayers library. For Google Maps I need to develop everything separately. Keeping OpenLayers 2 (IMatch 5) running alongside OpenLayers 4 (IMatcvh 2017) would be even more of a hassle.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

Mario

Over the weekend I had time to finish most of the implementation of the map panel - server side and the HTML/JavaScript.

The Map Panel is the most complex endeavor so far. Because it not only requires a lot of JavaScript code (I based it on the latest and greatest OpenLayers 4 version!) but also 'services' both from IMatch and IMWS.

Many functions required by the map panel, e.g., management of geo-locations, assigning coordinates to files etc. have been implemented for IMatch WebServices. This means that these functions can later be used as well by IMatch WebViewer or any other app connecting to IMatch WebServices. Which is great.

Everything that needs a user interface (aka a dialog box) or that interfaces with IMatch (e.g., the file window) has been implemented for the IMWS embedded in IMatch. This covers, for example, the edit or create location dialog boxes, the "find files nearby" dialog box and similar things. To offer these features in a "web browser only" app would only need to re-implement these dialog boxes in HTML. But the basic services are now provided by IMWS for both IMatch and IMatch Anywhere.

While working on this, I vamped up the feature set a bit, giving file and target markers and locations a few new features. I think this is good enough for the initial IMatch 2017 version. More features can be added to the Map Panel later easily - because it's now all JavaScript and HTML. Quick to change and enhance.

This is how a popup now looks when you click on a file marker on the map (click to zoom):




Let me know what you think
The buttons at the bottom give you direct access to features like "target marker here", "create location", "reveal in file window", "find nearby files".
To avoid accidentally dragging a file marker or a location (and thus changing their coordinates) I have added a lock button  in the main toolbar which locks all markers (except the target marker) on the map. Small thing but very helpful - especially if you use the Map Panel on a touch device.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

jch2103

Looks very promising. The 'lock' is a very good addition.
John

sinus

Looks very good.

Since you wants feedback, here we are:

1 a small one: the image is too far to the right, but I think, this is a final design-make-up. Nice the text-flow "around" the image.

2 Very nice having the icons (target marker here ...) at the bottom

3 The lock button sounds great, even if I cannot fully imagine it

4 I believe, you have solved, how you do display several images in the same location? Means, for example, if 100 files are in the file window and I choose a "Map layout", how does IM display these 100 images in the same location? (I believe you described it somewhere, could not find it yet and in my IMAnywhere it worked not.

5 How do you are able to search for a coordinates? I wonder, I tried for example search for your given 51... N, 0 ... W. and eded somewhere in USA instead of London? And here is the next question, failing to write this small "0" for degree, how can I write correct and easy coordinates? In the first image above you wrote .... 0 deg. This I could write easy.  Sorry, but for me this is a bit new. I can find a place like London, Piccadilly Circus easy, but not a coordinate.

6 These points above are all small ones or "I do not know", overall your map-improvements looks very good.
Best wishes from Switzerland! :-)
Markus

Mario

Quote4 I believe, you have solved, how you do display several images in the same location?

Yes. Same solution as for IMatch WebViewer. Multiple files in the same location are displayed as clusters, which expand when you zoom in (the blue circles in the screen shot). When you click on a cluster, the popup allows you to navigate between the images.

Quote5 How do you are able to search for a coordinates?

Like the Map Panel in IMatch 5, the new map panel allows you to search for both place names (London, Kings Cross) or to search for coordinates in decimal format.

If you scroll up in this thread a bit you see both the search mask and my explanation of it.

Do a <Ctrl>+<F> for To search for a location or to position  in this thread to find the post.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

sinus

Quote from: Mario on April 11, 2017, 12:53:45 PM
Quote4 I believe, you have solved, how you do display several images in the same location?

Yes. Same solution as for IMatch WebViewer. Multiple files in the same location are displayed as clusters, which expand when you zoom in (the blue circles in the screen shot). When you click on a cluster, the popup allows you to navigate between the images.

Thanks Mario, I have found all.

I do know now, why I have not seen the "several images in the same location".
Because I have enabled "showing the images in the map".

And there, if I am not wrong, only one image is there, I cannot see, that there are several images.
As soon as I have unabled seeing the images, I have seen the blue circle with the number.

Thanks.
Best wishes from Switzerland! :-)
Markus

Mario

QuoteAnd there, if I am not wrong, only one image is there, I cannot see, that there are several images.

Correct. This is why you have two views and can toggle. The map can only display one "icon" for a coordinate, so either its a flag, a cluster icon or an image.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook

stonecherub

Mario!

Please, please, PLEASE bring IMatch forward five millennia into the modern age and use decimal degrees for geolocations. I know, positions are usually handled by software and might as well be in radians (probably are where we can't see them) but sexagesimal degrees-minutes-seconds is awkward. Each one has its own symbol and degrees isn't one of the keys on the keyboard.

Not only that, but precision demands that we use the decimal, anyway, because a second is 31 m wide and my cheap Garmin reports 3-5 m accuracy. The end result is a position value needing 15 characters including numerals, symbols, spaces and that damned decimal point.

Decimal degrees to the 5th place (1.1 m - close to GPS accuracy) has 8 numerals and the decimal point, no symbols. Neat and clean and infinitely easier to write down should you need to.

If anybody reading this can explain to me why degrees-minutes-seconds makes more sense to them than decimal degrees, I would love to know your reason.

sinus

Quote from: stonecherub on April 12, 2017, 04:40:30 AM
Mario!

Please, please, PLEASE bring IMatch forward five millennia into the modern age and use decimal degrees for geolocations. I know, positions are usually handled by software and might as well be in radians (probably are where we can't see them) but sexagesimal degrees-minutes-seconds is awkward. Each one has its own symbol and degrees isn't one of the keys on the keyboard.

This is, what I meant in point 5 of my post above.
I can much better write

43.095194 N
as
43 x 05ß42.7" where x means this small 0 for degree.

I do not know, what is "modern" or "state of the art", I simply would like be able to write it easy with my keyboard  ;D

But I believe, that this is possible with IMatch. I tried it just now to write "47.212185,7.990338" and IMatch found the location!  :D


Best wishes from Switzerland! :-)
Markus

Mario

Quote from: stonecherub on April 12, 2017, 04:40:30 AM
Mario!

Please, please, PLEASE bring IMatch forward five millennia into the modern age and use decimal degrees for geolocations.

I can't follow. IMatch uses decimal degrees for GPS coordinates everywhere. Map panel, filter, search, etc. What do you refer to?

Or do you mean the display in the Metadata Panel?  By default, IMatch displays data there as formatted by ExifTool (which uses ° and is preferred apparently by many users).

If you don't like this, just switch the coordinate display to the decimal coordinates (enable the Use RAW value) for the lat/lon tags in your metadata panel layout.
If you work with GPS variables somewhere, you can also use the RAW value there.

It's all there already.
-- Mario
IMatch Developer
Forum Administrator
http://www.photools.com  -  Contact & Support - Follow me on 𝕏 - Like photools.com on Facebook