[OpenLayers-Users] Transparent Markers

Sveen Atle Frenvik (Geomatikk IKT) Atle.Frenvik.Sveen at geomatikk.no
Thu Aug 19 07:14:14 EDT 2010


On 08/19/2010 12:08 PM, Kalyan Kamepalli wrote: 

	Atle, 
	
	
	The way I create my markers is exactly the same. The only thing I didn't know is that I can create transparent icons. Do you have any idea on which editor can create transparent icons ? Or is it possible to create them using normal windows picture manager ??

Ok, then the case of confusion was not OpenLayers at all ;) 

Well, i'm not using windows, but i have a feeling that the windows picture manager won't do the job. 

Try using for example paint .net, gimp or some other "advanced" graphics editor. I guess google knows a lot, i don't ;)

good luck!

-atle



	
	
	Cheers,
	Kalyan
	
	
	On Thu, Aug 19, 2010 at 8:02 PM, Sveen Atle Frenvik (Geomatikk IKT) <Atle.Frenvik.Sveen at geomatikk.no> wrote:
	

		On 08/19/2010 11:48 AM, Kalyan Kamepalli wrote: 

			I use markers.


		Well, not that I am familiar with markers, but according to:  http://dev.openlayers.org/releases/OpenLayers-2.9.1/doc/apidocs/files/OpenLayers/Marker-js.html you can use custom ghraphics for your markers as well:
		
		var size = new OpenLayers.Size(10,17);
		var offset = new OpenLayers.Pixel(-(size.w/2), -size.h);
		var icon = new OpenLayers.Icon('http://boston.openguides.org/markers/AQUA.png',size,offset <http://boston.openguides.org/markers/AQUA.png%27,size,offset> );
		markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(0,0),icon));
		markers.addMarker(new OpenLayers.Marker(new OpenLayers.LonLat(0,0),icon.clone()));
		
		Note that if you pass an icon into the Marker constructor, it will take that icon and use it.  This means that you should not share icons between markers -- you use them once, but you should clone() for any additional markers using that same icon.
		
		
		So, if you make your marker transparent using your favourite graphics editor you should be all set.
		
		-atle 



			On Thu, Aug 19, 2010 at 7:18 PM, Sveen Atle Frenvik (Geomatikk IKT) <Atle.Frenvik.Sveen at geomatikk.no> wrote:
			

				On 08/19/2010 03:42 AM, Kalyan Kamepalli wrote: 

					Is there someone to help me out in this ?? 
					
					
					Can we make transparent markers ? This is really important for me as the markers hiding the geometry underneath them and we don't want that to happen.
					
					


				Are you using Markers or Vectors ? 
				
				I use vectors, and then I am able to use an externalGraphic for point style. This can be a .png file, with all the transparency needed.. 
				
				-atle
				

					Any help is very much appreciated.
					
					
					Thanks,
					Kalyan
					
					
					On Wed, Aug 18, 2010 at 4:07 PM, Kalyan Kamepalli <kalyan.kamepalli at gmail.com> wrote:
					

					Hello group,  
					
					
					Currently, all my markers are sitting on top of actual map data.But, I don't want to hide the actual data.So, Is it possible to set a transparent background to marker ?? 
					
					
					Cheers,
					Kalyan


					
					_______________________________________________
					Users mailing list
					Users at openlayers.org
					http://openlayers.org/mailman/listinfo/users
					  



				-- 
				Atle Frenvik Sveen
				Utvikler
				Geomatikk IKT AS
				tlf: 45 27 86 89
				atle.frenvik.sveen at geomatikk.no

				_______________________________________________
				Users mailing list
				Users at openlayers.org
				http://openlayers.org/mailman/listinfo/users
				
				




		-- 
		Atle Frenvik Sveen
		Utvikler
		Geomatikk IKT AS
		tlf: 45 27 86 89
		atle.frenvik.sveen at geomatikk.no




-- 
Atle Frenvik Sveen
Utvikler
Geomatikk IKT AS
tlf: 45 27 86 89
atle.frenvik.sveen at geomatikk.no
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.osgeo.org/pipermail/openlayers-users/attachments/20100819/45bd7900/attachment.html


More information about the Users mailing list