@anonymous-piwik-user opened this Issue on March 30th 2010

Features of this version:
This version provides a widget that represents Live users on a Map and in the visitor menu you can find the same Map.

Howto Install:
Download the zip provided as attachment
unzip, it will create a directory Maps
copy this directory in piwik/plugins/
in config add the following section

[Maps]
maps_key = "Here your Google Maps API key"

go to Piwik > Settings > Plugins and enable the plugin

Changelog:
0.1: Beta release first features are implemented and ready to be tested. Note this version can contain bugs.

Upcoming:
Show visitor data retrieved from archive
Show visit intensity
Switch between Continent, Country, City view by buttons instead of only by zoom.

In a later stage other Maps providers will be add.

@anonymous-piwik-user commented on March 30th 2010

Attachment:
menu_continent.PNG

@anonymous-piwik-user commented on March 30th 2010
@anonymous-piwik-user commented on March 30th 2010

Attachment:
widget_country.PNG

@anonymous-piwik-user commented on March 30th 2010

Attachment: Fix: City view
Maps_0.1.zip

@anonymous-piwik-user commented on March 30th 2010

Attachment:
menu_city.PNG

@mattab commented on March 30th 2010 Owner

That sounds interesting! could you please post screenshots of all the new screens added? thx

@anonymous-piwik-user commented on March 30th 2010

See that there is a problem with the city view will fix asap.

@mattab commented on March 30th 2010 Owner

Good start, I would like to see this included in Piwik core at some point. But there would be a few things to change. Would you be interested into having this in core?

I have a few questions

  • Does each dot represent a visitor?
  • if it is a google map, could we use the google maps markers and have a popup for each visitor that would contain all the Live! plugin info currently displayed in the Live! widget? ie. OS, browser, page viewed, visit time, etc.
  • how often does the map get updated?
  • if GeoIP is installed, does it use the lat/long info?
  • if GeoIP is not installed, does it still work? where from do you get the lat/long info for countries?

I gathered some thoughts in the ticket #274 ; generally I think our safest approach would be to use the open source technology SVG to draw maps, instead of relying on google maps (if we want to include this in core). Let me know what you think!

@anonymous-piwik-user commented on March 30th 2010

Offcourse I am interested in putting it in the core. I will try to answer your questions.

At the moment every dot represents a continent, country or city. I have done this to prevent drawing endless pointers on the same place. lat/long data is on city level so drawing multiple dots would be useless. In the future coloring will indicate visit detail.

In a later stage I will add a click event to a marker to get the necessary details. At the moment Live! doesn't provide lat/long data. So I wrote my own API at the moment this can be replaced in the future.

The data is updated every 30sec. Will be adjustable in the future.

At the moment GeoIP needs to be installed because my API is gathering data like lat/long.

I created 2 DataFiles for lat/long info for countries and continents these are build from the MaxMind files. I am not sure if the abbreviations of GeoIP are similar of those piwik is using? If so these datafiles could be used also when GeoIP is disabled.

I did some research in the different maps provider and in general Google or Yahoo provide a more detailed map at the moment the opensource maps just miss general information like city names in most parts of the world. For me this was the decision to choose for Google.

I used the flash SDK which gives the advantage that all the methods needed to draw the map are build within the SWF the only thing that is retrieved from Google are the tiles. And I think that it is saver to rely on Google for the tiles then a opensource alternative.

I understand that this decision is controversial but in the end I think it is saver for now to bet on a Google or Yahoo. To be clear in the future I also will support openstreetmap but this hasn't priority at the moment. I hope this won't generate any problems.

@mattab commented on March 30th 2010 Owner

I wasn't suggesting openstreemaps, but instead using SVG maps and add pointers/markers dynamically onto them. Take a look at #274 for pointers to SVG maps (on wikipedia).

The big problem with google maps is the need for the API_KEY. We can't force Piwik users to get one, so we would need to be independent from third party providers (and SVG is becoming really strong as a technology).

Having this plugin as a 3rd party is fine too, for sure. If you want to have it included in core, we would need to consider being independent from google or yahoo (or even openstreetmaps). Let me know what you think!

@anonymous-piwik-user commented on March 30th 2010

I think that it is really interesting the SVG maps but at the moment it is rendering very slow. Here it took a minute to render a world map. Will do some extra research on this to see if I can make it work for the Maps plugin.

I can also try to port it to the Google Javascript API 3 from Google this doesn't need a API key anymore. But then you still are depended on Google.

@anonymous-piwik-user commented on March 30th 2010

I think I can also make it work in SVG now found a map that has some nice features that I can use now i need to find a way how I can make the zoom element. Will drop Google for now and focus on SVG.

Is also interesting for me because I am going to learn a lot more with SVG then with Google Maps that did all the thinking for me.

@mattab commented on March 31st 2010 Owner

renelux, great to hear.
I personally don't know much about it, so anything you find or build is going to be useful.

Please feel free to post all your SVG related findings in the other ticket #274 with maybe a proposal (text or code) of how you think we should implement it in Piwik, and we can discuss / review. Cheers

@anonymous-piwik-user commented on April 9th 2010

Hello, thanks for the great plugin!
When I click on MapsLive! the map is only 205px heigh.. I tried changing the file controller.php to:

function getLiveVisitorsMapMenu() {
        $this->view("Maps.getLiveVisitsWithGeoDataDetails", "100%");
    }

But it's the same..

@anonymous-piwik-user commented on April 20th 2010

Hey, why not using google charts to display the visit numbers? http://code.google.com/apis/charttools/
Just a suggestion!

@anonymous-piwik-user commented on April 20th 2010

I'm getting an error trying this plugin.

Error Loading GeoData
faultCode: Client.CouldNotDecode
faultString: 'Error #1085' faultDefault: 'null'

What does it mean?

Google API key is in the config file...

@mattab commented on May 12th 2010 Owner

Renelux, any update on the map plugin using SVG?
Thanks

@anonymous-piwik-user commented on May 12th 2010

Matthieu, I did look in to it but at the moment I am lacking time to work on the plugin. It is possible to let it work with SVG but in browsers like IE it is slow and not very usable.

Will see if I can contact Gregor who posted in the forum topic, about his Map in flash if we can use that I think that will be a better solution.[]

@anonymous-piwik-user commented on June 15th 2010

Replying to cschneider:

I'm getting an error trying this plugin.

Error Loading GeoData
faultCode: Client.CouldNotDecode
faultString: 'Error #1085' faultDefault: 'null'

What does it mean?

Google API key is in the config file...

I'm having the same problem. Could someone explain?

Thank you!!!

@anonymous-piwik-user commented on July 24th 2010

After the last piwik-update -> 0.6.4. I get some errors: #1505

@gka commented on July 25th 2010 Member

I just created another maps plugin for piwik, which doesn't rely on external services like google maps.

[1514]

@anonymous-piwik-user commented on July 25th 2010

Some errors can be fixed:

Maps/Maps.php, line 50:
Piwik_EditMenuUrl('General_Visitors', 'Maps Live!', array('module' => 'Maps', 'action' => 'getLiveVisitorsMapMenu'));
to:
Piwik_AddMenu('General_Visitors', 'Maps Live!', array('module' => 'Maps', 'action' => 'getLiveVisitorsMapMenu'));

Maps/API.php, line 104:
/$sql = "SELECT , COUNT(".$count.") AS total
FROM " . Piwik::prefixTable('log_visit') . "
$sqlWhere
GROUP BY ".$count."
ORDER BY visit_last_action_time DESC
LIMIT $limit";
/
to:
$sql = "SELECT
, COUNT(".$count.") AS total
FROM " . Piwik_Common::prefixTable('log_visit') . "
$sqlWhere
GROUP BY ".$count."
ORDER BY visit_last_action_time DESC
LIMIT $limit";

But still I get no ne markers on the google map, google maps api key and auth-token are not always submitted correctly (problem shall be reproducable with the posted changes). Does anyone knows this problem and can provide a workaround?

@mattab commented on November 16th 2010 Owner

Renelux, do you plan to maintain the plugin? please let us know and we will reopen the ticket.

This Issue was closed on April 23rd 2011
Powered by GitHub Issue Mirror