Geographic information systems (GIS) have played a central role in many web-applications in the last years. Geolocating users and other things (e.g., cars, drones) is a functionality that has been included in all kind of information systems from social networks to mobile workforce management systems. Even though each GIS is used in a particular area with its own objectives, they all share multiple features and requirements. Moreover, there has been a strong effort on standardization that has led to the creation of many different software artefacts with similar functionality implemented with diverse approaches, but still interoperable between them. Therefore, it is possible to apply techniques based on intensive software reuse, such as software product line engineering (SPLE) and model-driven engineering (MDE) to reduce the development effort involved in the creation of a web-based GIS application. In this work, we present a software framework based on SPLE and MDE techniques for the semi-automatic generation of web-based geographic information systems. The core of the framework is a SPL derivation engine that creates products with source code that is partly based on a repository of components, and partly dynamically generated using scaffolding (a specific MDE technique). Furthermore, we focus on building products using current web technologies with high-quality source code in terms of flexibility and sustainability.