Understanding the Maps feature...

Posted on
Wed Sep 23, 2015 6:05 am
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Understanding the Maps feature...

EDIT - Realised this afternoon that the last manual I uploaded was out of date and did not explain all of the mapping options. (translates as - "I uploaded the old version in error") :roll:

Please update your manual from this link: https://www.dropbox.com/s/jbabhg3zd5w92jl/iFindStuff%20Manual.pdf?dl=1


Hi all

I've had a few questions and confusion on how the mapping features work with iFindStuff. Although the manual does cover this in some detail I can understand why people might be confused.

If you're confused then don't think you're the only one. Probably my UK English accent & explanations. Let me try and walk you through the process.

Using maps is a staged process:

    1. Configure iFindStuff to save the Maps somewhere useful

    2. Decide on how often the maps should be created and the resolution & zoom

    3. Copy the icon files to the right places

    4. Decide if you want to use Custom icons or Google Standard ones

    5. Generate Static Maps or Dynamic ones

    6. Add them to control pages

Deciding where to put the maps

Maps are stored locally on your server machine. This applies to both the Static and Dynamic maps (more about that later). You decide where to put the maps on the Plugins/iFindStuff/Configuration menu option. It's important that you know the location and have write access to the folder. On my system I created a folder called /Users/Michael/Maps. This location is used to save ALL maps and also as a repository for image icon files that you should have downloaded from the server when you updated iFindStuff.

How often should they be updated?

While you're on the Config screen you can also set a couple of other options. To generate any Maps you must select the checkbox Update Maps? You also need to provide a frequency in seconds. I use 60 seconds but you can make it more or less. Actually, there probably isn't much point making it shorter than half your update frequency for devices.

Screen Shot 2015-09-23 at 12.03.29.png
Config and Maps
Screen Shot 2015-09-23 at 12.03.29.png (169.69 KiB) Viewed 3527 times


What should the maps look like?

There are a few other map options on the Config screen. The defaults that are there should be ok for most people but you can change them.

    Horizontal - number of pixels resolution for a Static Map (maximum is 640) - I use 600

    Vertical - number of pixels resolution for a Static Map (maximum is 640) - I use 300

    Zoom - Zoom Level 0-21 where 0=Whole World on a Map to 21 - one House on a map... 15 is a good choice

You should also get a Google Maps API key and paste it on this dialog. This key allows you to have 25,000 map updates per 24 hours. Without it you're limited to 2,500 and these are shared between all Google Maps users with your broadband provider! The process for this is discussed on the forum. You need to get the key authorised for Distance Matrix as well if you're using the Real Distance features.

So what's this Static v Dynamic Map thing?

Google Maps provides two options for maps - Static and Dynamic.

Static maps are generated by Google as a JPEG image file and that in turn is saved to the directory you selected in the first section. The file names are generated automatically from the Indigo Device Names. So in my case I have the following files in my /Users/Michael/Maps directory...

    Screen Shot 2015-09-23 at 12.58.28.png
    Saved map files...
    Screen Shot 2015-09-23 at 12.58.28.png (147.63 KiB) Viewed 3527 times


    MIKES IPHONE.jpg
    LIZ IPHONE.jpg
    LOUISE IPHONE.jpg
    LARUA IPHONE.jpg
    STUART IPHONE.jpg

and a special file:

    ALLDEVICES.jpg

These are image files and will be updated automatically by iFindStuff according to the frequency you set on the Config screen. In my case every 60 seconds.

I use these files on Control pages (more on that later).

Dynamic maps are HTML files that are created by iFindStuff. They are saved as mymap[DEVICENAME].html files in the same Maps directory that you specified in the Maps menu. The advantage of Dynamic maps is that they are displayed on the Server Map in a browser window and behave exactly like Google Maps so you can Zoom in/out and Pan the screen. The disadvantage is that Indigo doesn't let you add these to control pages yet so they're not much good if your remote from your Mac.

Dynamic maps are created using the Menu options for iFindStuff. You'll find two options on the Plugins/iFindStuff menu:

    Plot a single device on a Google Map (you can select a device after you've selected this option)

    Plot all devices on a Google Map

When selected iFindStuff will automatically open your standard Web Browser and display the map (in my case Safari)

Is that all for Dynamic Maps?

No - you can customise the icons that the system uses on maps. To do this you must first of all save the image files in one of the files you should have downloaded (iFindStuffIcons.zip) into the Maps folder you've been using so far. They are homemarker.png, marker.png and smartphone.png. It's important that you do this otherwise nothing will appear on the map - these are the default markers.

You can also add icons from the third file that you downloaded iFindStuffIcons2.zip. There are a number of image files with names like: Phone1Dyn.png or GeoFence1Dyn.png. These are custom files that you can use on DYNAMIC MAPS (not static ones).

If you copy these files to the Maps directory that you're using you can use them on Dynamic maps for devices.

How to I specify a custom icon for a device on a Dynamic Map?

If you edit an iDevice and select Edit Device Settings... You notice that one of the options on the configuration dialog is: Dynamic Maps Icon Filename. If you leave this blank then the standard 'smartphone.png' icon will be used. However, if you type in one of the other filenames, e.g. Phone2Dyn.png, into the field then iFindStuff will use that instead.

How do I specify a custom icon on a Static Map?

This is a little more complicated but most people have been ok with the explanation in the manual once they understand the concepts.

How do I use a Static Map on a Control Page?

If you create a Control Page for Indigo you can add a Static Map file directly. If you add a New Control to a device page you can select Refreshing URL to Display in the first field and then specify the filename for the URL.

Screen Shot 2015-09-23 at 13.00.23.png
Control Page
Screen Shot 2015-09-23 at 13.00.23.png (696.3 KiB) Viewed 3527 times


On a MAC it needs to be of the form:

file:///users/michael/maps/mikes iphone 6.jpg

Notice that it starts with file:// and then has the path to the Maps Directory /users/michael/maps/ (yes that is three '///'s) and then the filename mikes iphone6.jpg. You'll also notice that even though the file names are in CAPITALS in the folder I've used all lowercase.

Finally - I chose an Image Size that fits well on the page I'm creating. Often its 300 x 120 but the choice is up to you.

When the Control Page is viewed in a Browser or in Indigo Touch the placeholder will be replaced on the map. Here's an example with made up data :D

Screen Shot 2015-09-23 at 13.02.51.png
Control Page
Screen Shot 2015-09-23 at 13.02.51.png (1.26 MiB) Viewed 3527 times


I really how that helps clear things up. If not then comment and I'll try a different approach.

Good luck

Mike

Posted on
Wed Sep 30, 2015 12:22 pm
durosity offline
User avatar
Posts: 4320
Joined: May 10, 2012
Location: Newcastle Upon Tyne, Ye Ol' England.

Re: Understanding the Maps feature...

Loving this, it's nearly perfect... one minor teeny tiny little icle change i'd love though.. the ability to have different map sizes for the same devices. So perhaps rather than having the options in the plugin preferences it could be setup as an action group which could then be actioned by a schedule, rather than having to set a specific time for all devices. This would then allow for me to force a map update on some devices faster than others, and also have one set of images for iPhone based control pages and one for iPad/web view based ones.

Computer says no.

Posted on
Wed Sep 30, 2015 1:22 pm
Chameleon offline
Posts: 611
Joined: Oct 04, 2014

Re: Understanding the Maps feature...

durosity wrote:
Loving this, it's nearly perfect... one minor teeny tiny little icle change i'd love though.. the ability to have different map sizes for the same devices. So perhaps rather than having the options in the plugin preferences it could be setup as an action group which could then be actioned by a schedule, rather than having to set a specific time for all devices. This would then allow for me to force a map update on some devices faster than others, and also have one set of images for iPhone based control pages and one for iPad/web view based ones.


Sounds like a great idea and easy to code... yep I'll work that into the next release :D

Page 1 of 1

Who is online

Users browsing this forum: No registered users and 3 guests