Simple Map Plugin for FPP

This is a simple map plugin to geolocate one panorama.

Here is a screenshot of the plugin:

Demo is available here.

You can download the plugin for free here.

Here are the settings to install and configure it:

1. put the map.swf file on your server, in a specific folder,  ./files for example , if you use GOOGLE for tiles provider, you need to add 3 others files copyright.php , settings.xml and GoogleLogo.png in the same folder as the swf.

2. in the FPP config xml file, add this line:

 layer_5 = ./”my folder”/map.swf

replacing "my folder" with your own path; for example:

 layer_5 = ./files/map.swf

3.add this xml node:

 
<Umap>
      lat=48.8655
      lng=-2.98605
      loc_name = Bréhat (22) - France
      align = BM
      xoffset = 0
      yoffset = 0
      tooltip = Geolocation
      provider = GOOGLE
      maptype = hybrid
      mapzoom = 14
</Umap>

YOU NEED to respect this order for the parameters, I didn’t get the time to code some security scripts if the parameters are not in this order.

The first 2 parameters are for the geographic point (latitude and longitude).

The next  loc_name is to indicate a name for your location, and will appear at the top-left of the map.

The parameter  align gives you the possibility to place the icon around the corners of the player, it is the same as FPP:

TL: top-left
TM: top-middle
TR: top-right
BL: bottom-left
BM: bottom-middle
BR: bottom-right

The parameters  xoffset and  yoffset are here to do some positioning according to the needs.

The parameter  tooltip is here to modify the tooltip which appears when the mouse cursor is over an icon.

The parameter  provider gives you the possibility to switch between many tiles providers: 4 providers are available:
- GOOGLE
- YAHOO
- MICROSOFT
- OPENSTREETMAP

The parameter  maptype gives you the possibility to change the map type for the chosen provider:

- GOOGLE:
+ plan
+ satellite
+ hybrid
+ relief

- YAHOO
+ map
+ hybrid
+ satellite

- MICROSOFT
+ road
+ aerial
+ hybrid

- OPENSTREETMAP
+ mapnik
+ osmarender
+ cyclemap

The last parameter specifies the final zoom for the map, between 0 and 17, by default at 10.

4. add these two functions in the global node of the hotspots plugin, for those who wants to do others actions during map loading:

   
load_map = ''
close_map = ''
 

5. for those which need to move the icon, you can use the two xoffset and yoffset as this:

loadMain = '
         loadPano(panoName=images/pano,1000);
         onTransitionEnd=moveIcon();
      '

moveIcon = '
         external.umap.xoffset = 50;
      '

6. those who want to show/hide the button can do that with the function  external.umap.visible = 0 or  1; in the next example we hide the button at the beginning of the panorama, and show the button at the end of tiles loading:

onStart = 'external.umap.visible = 0;loadPreview();'
               
loadPreview = '
        pano.qualityStatic=low;
        loadPano(panoName=images/small/pano,300);
        onTransitionEnd=loadMain();
'

               
loadMain = '
        loadPano(panoName=images/pano,1000);
        onTransitionEnd=movePano();
'

movePano = '
        pano.qualityStatic=high;
        external.umap.visible = 1;
'

Some users report me that their map shows a blank rectangle during their tests.
You need to test your panorama on a webserver, on your webhoster or in a local view with MAMP for Mac or Easyphp for Windaube.

I will not develop more features for this plugin as another exists and it is more powerful; I invite users interested to have a look at it, it is GMap Widget For FPP, from Davx Medias

re: Simple Map Plugin for FPP

Nice plugin Vincent, and a good explanation!

Cheers,

Patrick

Nice work you also included

Nice work Smile
you also included the source files? Great Smile
Thanks