Uploaded image for project: 'Spatial Information Systems'
  1. Spatial Information Systems
  2. SIS-44

Update the 'demo.jsp' file in the SIS webapp to use an open source maps API



    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 0.3
    • Web services, Web site


      A suggestion was made on one of the SIS wiki pages to update the 'demo.jsp' file in the SIS webapp to use an open source maps API, such as Leaflet (http://leaflet.cloudmade.com), rather than Google maps.

      For reference, below is a copy of the comment from Paul Ramirez, see https://cwiki.apache.org/confluence/display/SIS/OODT+File+Manager+to+SIS+Connection+Demo for details:

      Instead of using Google Maps you may want to use Leaflet (http://leaflet.cloudmade.com/) or OpenLayers (http://openlayers.org/) due to required API key for the map. This might matter if you are going to host this example on the SIS Wiki or OODT Wiki as the required API would be attached to you.

      Here's a snippet of Leaflet code to setup the map:

      var map = new L.Map('map');
      // Setup the basemap      
      var osm = new L.TileLayer('http://otile{s}.mqcdn.com/tiles/1.0.0/osm/{z}/{x}/{y}.png', {
          minZoom: 1,
          attribution: 'Basemap <a href="http://creativecommons.org/licenses/by-sa/2.0/" target="_blank">CC-BY-SA</a> by &copy; <a href="http://openstreetmap.org/" target="_blank">OpenStreetMap</a>, Tiles Courtesy of &copy; <a href="http://open.mapquest.com" target="_blank">MapQuest</a>', 
          subdomains: ['1','2','3','4']
      // Add the basemap to the map
      // Create a marker for the map and add it
      var marker = new L.Marker(new L.LatLng(10.0, 30.0));
      // Attach a given HTML content to the marker. For brevity I truncated the content
      marker.bindPopup("Title: geodata.txt<br/>Link:<a href='http://localhost:8080...'>...</a>");

      Unlike the GoogleMap API this does not require a key and is an open source product as is the basemap (e.g. Open Street Map served by Mapquest). Then this would be a complete open source solution from top to bottom.


        1. SIS-44.rlaidlaw.2012-04-09.patch
          4 kB
          Ross Laidlaw
        2. screenshot_with_leaflet_pointradius.png
          327 kB
          Ross Laidlaw
        3. screenshot_with_leaflet_bbox.png
          327 kB
          Ross Laidlaw
        4. demo_openlayers_experiment.png
          129 kB
          Ross Laidlaw
        5. demo_openlayers_experiment.jsp
          10 kB
          Ross Laidlaw

        Issue Links



              chrismattmann Chris A. Mattmann
              rlaidlaw Ross Laidlaw
              0 Vote for this issue
              1 Start watching this issue