Discussions
Categories
Groups
Community Home
Categories
INTERNAL ENABLEMENT
POPULAR
PUBLIC CLOUD
PRIVATE CLOUD
Quick Links
MY LINKS
HELPFUL TIPS
Back to website
Home
Intelligence (Analytics)
google maps/ openstreet maps in BIRT
Arif shah
<p>Hi,</p><p> </p><p>Is there any maps extension available in BIRT report designer. Furthermore, does it allow customizing the markers? for example if we would like to use our own icons in images?</p><p> </p><p>Regards</p><p>Syed</p>
Find more posts tagged with
Comments
micajblock
<p>This was part of the Marketplace at one point. It is being moved. In the meantime you can access it here.</p><p> </p><p><a data-ipb='nomediaparse' href='
http://developer.actuate.com/community/forum/index.php?/files/file/1071-map-it-google-maps/'>http://developer.actuate.com/community/forum/index.php?/files/file/1071-map-it-google-maps/</a></p>
;
Arif shah
<p>Hi mblock</p><p> </p><p>Many thanks for your help. Can I use it in free birt designer? Does it have a possibility of adding customized icons? I would also like to highlight borders of certains areas/towns..is that possible?</p><p> </p><p>Regards</p><p>Syed</p>
micajblock
<p>Here are the answers to your questions (most of the information is in the BIRT Online Maps Integration.doc).</p><p> </p><ul class='bbcol decimal'><li>Can I use it with free designer - Yes, as long as you follow the Google licensing as described in the document - BIRT Online Maps Integration.doc. </li><li><span>Does it have a possibility of adding customized icons? - Not the version that is posted there. Attached is a newer version of the library and an example design that uses this new feature. Thanks to Puck Puck for making this change.</span> </li><li>[color=rgb(40,40,40);font-family:'Source Sans Pro', sans-serif;]I would also like to highlight borders of certain areas/towns..is that possible? Yes, look at the areas example. You will need to know lon/lat coordinates.[/color]</li></ul><p> </p>
Arif shah
<p>Hi,</p><p> </p><p>Can you please provide the data file with the attached example? I am getting few errors while providing my data file so I would like to see how the map and icons actually work the original data file and then I will modify it according to my own data</p><p> </p><p>Regards</p><p>Syed</p>
micajblock
<p>The data for the examples are in the zip.</p>
Arif shah
<p>The zip has two files. Addresses - Custom Icons.rptdesign and BIRT Online Maps.rptlibrary. The report data source is referring to a data folder that is supposed to have a csv file for the address and pin field. This is not included in the zip file</p><p> </p><p>Thanks</p><p>Syed</p>
micajblock
<p>the original example earlier in this thread has the data.</p>
Arif shah
<p>Hi,</p>
<p> </p>
<p>The Mapit seems to work fantastically well in my designer but it does not seem to load in my birtviewer. Do you know if there are some known issues with it? Is there any way for me to tell whether the mapit library is being read in birtviewer or is there any other issue causing the map not to load in birtviewer</p>
<p> </p>
<p>I have put a resource folder inside the home birt directory and put some other files along with the library to check if the resource directory path is correct</p>
<p> </p>
<p>Atleast the test excel data sources are being read in birtviewer so I assume the library file is also at correct location. Can you please help me in this?</p>
<p> </p>
<p>Thanks and Regards</p>
<p>Arif</p>
Arif shah
<p>Hi,</p>
<p> </p>
<p>Is there any feature/extension/script available for mapit library that can take the advantage of marker clustering in google maps? For example, if there are too many icons to be plotted which become hard to read and instead we put some cluster showing the number of icons/value in that area and then we can zoom into it. Something similar to the attached image?</p>
<p> </p>
<p>Arif</p>
PuckPuck
<p>Currently the library does not support pin clustering.</p>
<p> </p>
<p>Sorry</p>
Clement Wong
<blockquote class="ipsBlockquote" data-author="Arif shah" data-cid="129870" data-time="1407166617"><br><div><br><p>Hi,</p>
<p> </p>
<p>Is there any feature/extension/script available for mapit library that can take the advantage of marker clustering in google maps? For example, if there are too many icons to be plotted which become hard to read and instead we put some cluster showing the number of icons/value in that area and then we can zoom into it. Something similar to the attached image?</p>
<p> </p>
<p>Arif</p>
</div>
</blockquote>
<p> </p>
<p> </p>
<p>Yes, the library does not support clustering, but it is possible to extend the BIRT Online Maps to allow for clustering.</p>
<p> </p>
<p>Attached is very basic sample of using the MarkerClusterer method of Google Map clustering (<a data-ipb='nomediaparse' href='
https://developers.google.com/maps/articles/toomanymarkers#markerclusterer'>https://developers.google.com/maps/articles/toomanymarkers#markerclusterer</a>)
. The example is only a prototype and doesn't extend, but overwrites existing functionality.</p>
<p> </p>
<p>Two modifications in BIRT Online Maps library were made:</p>
<p> </p>
<p>1. Stylized the map</p>
<pre class="_prettyXprint">
var mapStyle = [
{
featureType: "poi.park",
stylers: [
{ hue: "#00d4ff" },
{ visibility: "simplified" },
{ lightness: 22 }
]
},{
featureType: "administrative.country",
stylers: [
{ visibility: "simplified" }
]
},{
featureType: "administrative.province",
stylers: [
{ visibility: "simplified" }
]
},{
featureType: "administrative.locality",
stylers: [
{ visibility: "off" }
]
},{
featureType: "water",
stylers: [
{ saturation: 43 },
{ hue: "#00e5ff" },
{ lightness: 84 }
]
},{
},{
featureType: "landscape",
elementType: "geometry",
stylers: [
{ hue: "#00d4ff" },
{ lightness: -2 },
{ saturation: 36 }
]
},{
featureType: "road",
stylers: [
{ hue: "#00c3ff" },
{ lightness: 34 },
{ saturation: -41 }
]
},{
featureType: "administrative.country",
stylers: [
{ hue: "#00aaff" },
{ saturation: 18 },
{ lightness: 30 }
]
},{
featureType: "poi.attraction",
stylers: [
{ hue: "#00bbff" }
]
},{
featureType: "administrative.province",
stylers: [
{ visibility: "off" }
]
},{
featureType: "road",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
},{
featureType: "road",
elementType: "geometry",
stylers: [
{ visibility: "simplified" }
]
},{
featureType: "transit.station.airport",
stylers: [
{ hue: "#00c3ff" },
{ saturation: 31 },
{ lightness: 39 }
]
},{
featureType: "poi",
stylers: [
{ hue: "#00bbff" },
{ saturation: 9 },
{ visibility: "on" },
{ lightness: 55 }
]
},{
featureType: "landscape.man_made",
stylers: [
{ lightness: 32 }
]
},{
featureType: "road",
stylers: [
{ lightness: 13 }
]
},{
featureType: "transit.line",
stylers: [
{ visibility: "off" }
]
},{
featureType: "transit.station",
stylers: [
{ visibility: "off" }
]
},{
featureType: "administrative.neighborhood",
stylers: [
{ saturation: 17 },
{ lightness: 26 },
{ hue: "#00b2ff" }
]
},{
featureType: "landscape.natural",
elementType: "labels",
stylers: [
{ visibility: "off" }
]
},{
}
];
</pre>
<p>2. Loaded additional MarkerCluster Javascript API @ <a class="bbc_url" href="
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer_compiled.js">http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/src/markerclusterer_compiled.js</a></p>
;
<p> </p>
<p>And changed the original funciton<em> this.loadLocation(actuate.birt.maps.locations
)</em> to insert into a marker array for use in a MarkerClusterer constructor (reference @ <a data-ipb='nomediaparse' href='
http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/docs/reference.html'>http://google-maps-utility-library-v3.googlecode.com/svn/trunk/markerclusterer/docs/reference.html</a>).</p>
;
<pre class="_prettyXprint">
if (actuate.birt.maps.locations != null && actuate.birt.maps.locations.length > 0) {
var markers = [];
for (i = 0; i < actuate.birt.maps.locations.length; i++) {
// this.loadLocation(actuate.birt.maps.locations[i]);
var latLng = new google.maps.LatLng(actuate.birt.maps.locations[i].lat,actuate.birt.maps.locations[i].lon);
var marker = new google.maps.Marker({
position: latLng
});
markers.push(marker);
}
var markerCluster = new MarkerClusterer(this.map, markers);
}
</pre>
<p>This prototype example has been tested in BIRT Designer Professional versions 11 SP4 Fix1 and iHub3, and will not work in OS BIRT 3.7x or 4.x.</p>
<p>
Arif shah
<p>Hi Clement Wong,</p>
<p> </p>
<p>Many thanks for the help. I will however need it for Birt OS</p>
<p> </p>
<p>Arif</p>
Cheesus Crust
<p>Hi Clement,</p>
<p> </p>
<p>Testing your marker clustering .rptdesign myself and it works wonderfully except the info window functionality in .addLocation appears to no longer work? Any idea how to restore it?</p>
Clement Wong
<p>Good catch. When I commented the <span>line <em>this.loadLocation(actuate.birt.maps.locations
)</em></span>, it prevented the <em>createPointOverlay </em>from being called.</p>
<p> </p>
<p>Here is a simple fix for the previous example:</p>
<pre class="_prettyXprint">
if (actuate.birt.maps.locations != null && actuate.birt.maps.locations.length > 0) {
var markers = [];
for (i = 0; i < actuate.birt.maps.locations.length; i++) {
// this.loadLocation(actuate.birt.maps.locations[i]);
var latLng = new google.maps.LatLng(actuate.birt.maps.locations[i].lat,actuate.birt.maps.locations[i].lon);
var marker = new google.maps.Marker({
position: latLng,
title: actuate.birt.maps.locations[i].infoHTML
});
var infowindow = new google.maps.InfoWindow({
content: 'none'
});
google.maps.event.addListener(marker, 'click', function() {
infowindow.setContent (this.title);
infowindow.open(this.map,this);
});
markers.push(marker);
}
var markerCluster = new MarkerClusterer(this.map, markers);
}</pre>