Google logo

Google Earth Enterprise Documentation Home | GEE Server administration

Add custom search services

If you want to access a custom data source, you can create your own search plug-in and access it as a search tab definition in Google Earth Enterprise Server. A custom search plug-in will create requests and responses using the common Python-based search framework, letting you adapt your search to any data source. Your custom search plug-in will receive search requests directly from Google Earth Enterprise Client (EC), or any other clients in the form of URL parameters.

For example, with custom search plug-ins you can use Maps API and Places API to leverage the power of their data sets. You can also use a proprietary database, for example, power conversion sites, then search for the sites using internal IDs or city names.

A custom search plug-in may also provide a solution if you want to search data that is not on your Google Earth Enterprise Server or you want to combine Google Earth Enterprise databases in new ways. For example, you may want to combine a Places search with your own vector point data set, enabling your users to search by city name or the name of your facilities. Your custom search plug-in would forward your request to both the POI Search plug-in and the Places plug-in and return a merged set.

Note: Google Maps API and Places API access services over the internet, and require licenses to use.

Note: You will need some familiarity with Python to work with custom search plug-ins.

Configure search queries for Google Earth EC and Google Maps

Any web service, servlet, or web application you configure the search tabs to query:

Access Search Plug-ins

The Google Earth Enterprise search plug-ins are stored in a default directory that you can use to add or delete your custom plug-ins as required. You can also modify the configuration file,/opt/google/gehttpd/conf.d/mod_wsgi-ge.conf, to register new search plug-ins with Google Earth Enterprise Server instead of creating search tabs. The configuration file provides a convenient method for managing search plug-ins with scripts, for example, to register newly created plug-in endpoints so that they can be accessible when you view your database in Google Earth EC.

You can access the plug-ins that are installed with Google Earth Enterprise Server at:


For example, access /gesearch/ExampleSearch in your browser as follows:


The plug-in end points are for Google Earth Enterprise search plug-ins are defined in /opt/google/gehttpd/conf.d/mod_wsgi-ge.conf.

# Handles Places search requests. WSGIScriptAlias /gesearch/PlacesSearch /opt/google/gehttpd/wsgi-bin/search/plugin/ # Handles Coordinate search requests. WSGIScriptAlias /gesearch/CoordinateSearch /opt/google/gehttpd/wsgi-bin/search/plugin/ # Handles Federated search requests. WSGIScriptAlias /gesearch/FederatedSearch /opt/google/gehttpd/wsgi-bin/search/plugin/ # Handles Example search requests. WSGIScriptAlias /gesearch/ExampleSearch /opt/google/gehttpd/wsgi-bin/search/plugin/ # Handles POI search requests. WSGIScriptAlias /POISearch /opt/google/gehttpd/wsgi-bin/search/plugin/

Implement your custom search plug-in

You implement your custom search plug-in by creating your own python search application using WSGI, then you register your new search plug-in so that it can be added as you publish databases.

To implement your custom search plug-in:

  1. Create your search application, using the WSGI framework. See the ExampleSearch Python module for example code.
  2. Locate your search plug-in, for example, in the /opt/google/gehttpd/wsgi-bin/search/plugin/ directory.
  3. Register your plug-in by adding its definition in the python module configuration file: /opt/google/gehttpd/conf.d/mod_wsgi-ge.conf. Your registration in the configuration file should look something like the following:

    # Handles My Custom search requests.
    WSGIScriptAlias /gesearch/CustomSearch /opt/google/gehttpd/wsgi-bin/search/plugin/

  4. Restart Google Earth Enterprise Server:

    # sudo /etc/init.d/geserver restart

  5. Open the Google Earth Enterprise Server Admin console and click Search tabs. The list of Search tabs definitions appears.
  6. Click Create New to create a new search definition.
  7. Add a name and label.
  8. In the URL field, add the WSGIScriptAlias that you specified in the /opt/google/gehttpd/conf.d/mod_wsgi-ge.conf file. In this example, you would enter gesearch/CustomSearch.

    If you want to add query parameters that are hidden from Google Earth EC, such as the way the results will be sorted or the number of results displayed at a time, enter them in the Additional Query Parameters field. The syntax is key1=value1&key2;=value2. For example, sortby=name&numresults;=10 sorts by the name field and displays 10 results at a time. Your search application must be able to understand and respond to these key/value pairs, so you must be very familiar with your search application to use this field.

  9. Set the fields, and other options as needed and click Save. Your new custom search definition is added to the list on the Search tabs page.
  10. When you publish a database, add your search definition from the Search tabs drop-down list in the Publish dialog.