Google Maps API exporter

Extensions and customization
Post Reply
pegerp
Posts: 124
Joined: 21 Dec 2011 17:10

Google Maps API exporter

Post by pegerp » 03 Nov 2014 21:22

Hello.

Google Maps API exporter will export graphs for use with Google Maps API. The plugin is especially useful for large graphs. The graph is pre-rendered to PNG images and displayed with Google Maps API. The API provides lots of tools to work with the graph.

The plugin will export a HTML page which includes a JavaScript file which loads the Google Maps canvas. Customizing the JavaScript by adding custom functionality is possible.

Please note that exporting huge graphs will be slow. It can take hours to export hundreds of thousands of nodes and several zoom layers on the Google Maps API. There are optimization methods but they are not yet implemented.

Download or see install instructions at:
https://marketplace.gephi.org/plugin/go ... -exporter/

Example with hundreds of thousands of nodes:
https://forum.gephi.org/viewtopic.php?f=28&t=2314

Live example: http://graphmap.net/map/sc-10-10000mem- ... ized-label
Live example 2: http://graphmap.net/mapper/sc-10-10000m ... ized-label
Image
Last edited by pegerp on 19 Dec 2014 08:26, edited 4 times in total.

pegerp
Posts: 124
Joined: 21 Dec 2011 17:10

Re: Google Maps API exporter

Post by pegerp » 09 Dec 2014 21:10

This plugin has been updated. There are some usability fixes. Also code has been cleaned up.

Changes:
* Output directory is created. It could be confusing with previous version as the plugin did not seem to do anything if the output directory was missing.
* Progress bar is now working
* Canceling the export is possible
* Graph will look like on the Preview pane - earlier font and colors were using a preset

Other fixes
* Might work better with Mac OSX - the plugin has been compiled using Java 6 instead of Java 7 (works with both Java versions!). This update was done based on feedback from a user - hopefully the plugin now works well on all platforms.

Live example at http://graphmap.net/map/sc-10-10000mem- ... ized-label

pegerp
Posts: 124
Joined: 21 Dec 2011 17:10

Re: Google Maps API exporter

Post by pegerp » 18 Dec 2014 19:01

New update for the plugin again.

New features:
* Exporting graph as JSON to help with interactive UI features
- The default example shows a list of visible nodes on top of the map. All features that are supported in Google Maps API are available here as well.
- User interaction with the graph becomes more feasible with this. For example clicking on a node or hovering over a node to get information is now possible. I may add examples for these functions in the future releases.

Updating / Installing
The plugin can be installed or updated using Gephi: Tools > Plugins > Google Maps Exporter

Here's a screenshot showing the top-10 largest visible nodes on the graph. The list updates as user zooms in on the graph.
Image

pegerp
Posts: 124
Joined: 21 Dec 2011 17:10

Re: Google Maps API exporter

Post by pegerp » 30 Dec 2014 21:25

New update today, version 1.2:

Features:
* Optimized rendering logic to speed up graph export significantly
* Node labels are scaled according to zoom level instead of being fixed size
* Progress bar shows current progress in more detail

Fixes:
* Node alignment fixes when zooming in on the graph
* Export panel remembers settings
* Debugging message on mouse move
* Exporting didn't always work if the preview wasn't refreshed

Image

pegerp
Posts: 124
Joined: 21 Dec 2011 17:10

Re: Google Maps API exporter

Post by pegerp » 14 Dec 2015 10:01

I've updated the plugin to be more compatible with Google Maps API. It is now easy to render Google Maps shapes on the map canvas. For example drawing circles, edges and comples polygons is possible.

Large graphs can be pre-rendered and then Google Maps API can be used to make the graph interactive - for examples clicking and hovering nodes. Google Maps API is very versatile so customizing graphs becomes easy.

The examples that come with the plugin use TaffyDB as the database. Instead of large JSON database file a database server can be used. This way client doesn't have to load large JSON database in single run. There are example files ui.js and ui2.js which include clear examples how to and functionality on the map.

Live examples at: (Gephi's forums don't allow direct links to be added, copy & paste the link below)
http:// googlemapsexporter.firebaseapp.com/index.html
http:// googlemapsexporter.firebaseapp.com/index2.html

Examples images at:
http:// i.imgur.com/NTELrjl.png
http:// i.imgur.com/BPPfsZY.png

Plugin can be downloaded at:
https:// marketplace.gephi.org/plugin/google-maps-exporter/

Support for the plugin at Gephi's Facebook group or send me PM via the forums - I'll get notification to my email.

Post Reply