Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can I modify my installed Openlayers plugin files to add a new layers origin? If yes, what files?

share|improve this question

Yes, it is possible by manually editing the python file in .qgis/python/plugins/openlayers_plugin and creating an additional html file in the html folder.

You have to set up a local server (like Apache by MS4W) if you want to use your own tiles as localhost.

Only disadvantage is that you have to do the adaptaion every time the plugin gets updated.

This is what I inserted:

   self.olLayerTypeRegistry.add( OlLayerType(self, 'myMapnik','osm_icon.png', 'myMapnik.html', True) )

And inside the myMapnik.html (a copy of osm.html):

        var myMapnik = new OpenLayers.Layer.OSM(
            eventListeners: {
              "loadstart": layerLoadStart,
              "loadend": layerLoadEnd
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.