Leaflet/Openlayers

ericdavisosu

New Member
I really like Fabrik's Google Map visualization. In fact, I think it is the best method of visualizing user-submitted location data on Joomla presently. Do you have any plans to do something similar with Openlayers or Leaflet? Google terms of service seem somewhat strict and do not allow maps on a private network, which likely effects many businesses and government customers. I searched the forums and it looks like you guys previously had an OSM plugin, which is currently depreciated. Openlayers and Leaflet seem like the open source geospatial frontrunners now.

The example code for Leaflet seems somewhat easy to use for making a basic visualization of a content type but I am just a hobbyist and don't have the coding skills to actually make a visualization with it. I tested it on my server and it displays a basic map with multiple markers and could likely be programmed to give users the option to change tile servers and host the script locally or via cdn. Here is the code if any developers are interested in making a visualization out of it:

Code:
<!DOCTYPE html>
<html>
<head>
    <title>Simple Leaflet Map</title>
    <meta charset="utf-8" />
    <link
        rel="stylesheet"
        href="http://cdn.leafletjs.com/leaflet-0.7/leaflet.css"
    />
</head>
<body>
 
    <div id="map" style="width: 600px; height: 400px"></div>
 
    <script
        src="http://cdn.leafletjs.com/leaflet-0.7/leaflet.js">
    </script>
 
    <script>
 
    var planes = [
        ["7C6B07",-40.99497,174.50808],
        ["7C6B38",-41.30269,173.63696],
        ["7C6CA1",-41.49413,173.5421],
        ["7C6CA2",-40.98585,174.50659],
        ["C81D9D",-40.93163,173.81726],
        ["C82009",-41.5183,174.78081],
        ["C82081",-41.42079,173.5783],
        ["C820AB",-42.08414,173.96632],
        ["C820B6",-41.51285,173.53274]
        ];
 
        var map = L.map('map').setView([-41.3058, 174.82082], 8);
        mapLink =
            '<a href="http://openstreetmap.org">OpenStreetMap</a>';
        L.tileLayer(
            'http://{s}.tile.openstreetmap.org/{z}/{x}/{y}.png', {
            attribution: '&copy; ' + mapLink + ' Contributors',
            maxZoom: 18,
            }).addTo(map);
 
        for (var i = 0; i < planes.length; i++) {
            marker = new L.marker([planes[i][1],planes[i][2]])
                .bindPopup(planes[i][0])
                .addTo(map);
        }
             
    </script>
</body>
</html>
 
Very good idea. I have developt a web application before with Openlayers, PHP (with Codeigniter framework) and MySQL Spatial Extension (called mymapbase.com). Basicly it create a custom user table and then render geographic data on openlayers visualisation. Creating a custom user table and designing forms is very difficult part of coding, but fabrikar has already handled this part.
 
We are in need of some funding.
More details.

Thank you.

Members online

Back
Top