I am displaying multiple markers on Google Maps using Processing with unfolding maps library.
I would like to know whether there is any way to set the transparency to markers? Any opacity level I can specify?
Thanks in advance,
Hasala
Are you using one of the default markers? If so, which ones?
In general, you should be able to set the stroke and fill colors of the markers where you can also specify transparency in the normal Processing way.
myMarker.setColor(color(255, 0, 0, 100));
Check out the SimpleMarkerManagerApp example.
Related
The div that my openlayers map is in is about 300px wide, and I want to zoom down to level 0 (one single 256x256 tile), but I can't in OpenLayers. But I can with Google maps.
I've looked for a setting, but I can't find it.
All I want to do is see the whole world at the same time. I can in Google maps. Google lets you see about 150% of the world, but in openlayers in seems to be limited to 100%, which means if I want to see a map of the whole world (a reasonable request) I have to resize my window down to the exact pixel. That's a bit ridiculous. Is this really so hard to do?
Thanks.
Openlayers 2.12 had a change which prevented the map from zooming out to see two worlds if the base layer is set to wrapDateLine
https://github.com/openlayers/openlayers/blob/master/notes/2.12.md#changes-when-base-layer-configured-with-wrapdateline-true
The smallest tile what OpenStreetMap provides is 256x256 (http://c.tile.openstreetmap.org/0/0/0.png), so you cant get a smaller view of the world without resizing.
Is it possible to set the opacity of the tiles in google maps v3?
I have see in done for overlays but I want to make the actual map tiles slightly transparent.
Why would you make the tiles transparent, if they'll always be base "layer" for the map? Are you trying to somehow add an overlay behind the map tiles?
You can adjust the map tiles using the style feature of the Google Maps API:
http://goo.gl/3q4ex
I'm currently looking to achieve a gradient effect a bit like the rectangle in http://pjnicholson.com/Fireworks/fillgradients.htm
If I compromise a little I can get close to this using RadialGradientBrush... but is there any (not too painful) way to achieve the rectangular effect?
Use an ImageBrush instead and use this image (or a similar image generated using some image editor) for the background of your rectangle.
One solution a colleague and I came with was to derive a new Panel that used a WriteableBitmap as the source for its background.
The panel will give you the dimensions you need to make your WriteableBitmap. Using whatever algorithm you want you can fill it appropriately. In our case, we needed a radial or cone gradient, but the same concept applies.
Additionally, you can create several properties on your new control to specify the colors for the gradient. We adapted a LinearGradientBrush for our needs, but if you're working on just two colors, simple properties may suffice.
I don't have the code handy but will try to find it and post an update later. But the above should get you going.
I'm working on SEM image processing application, written in WPF. I have an image display control, derived from Canvas, which displays image & overlays using DrawingVisuals (one for each "layer"). It also implements Zoom & Pan using scale & translate transform, applied on DrawingVisuals.
When I zoom in the image to see individual pixels, they are displayed smooth, evidently using bilinear filtering to stretch the bitmap (no surprise, as WPF is rendered through Direct3D). However, for my use case, I would rather see individual pixels as sharp boxes, as usual in any image editor like Photoshop. That's why user of my app zooms the image -> to be able to operate on pixel level.
Is there such option in WPF (other than manually stretching the bitmap before displaying it)? I was not able to find anything.
thanks in advance,
Zbynek Vrastil
Czech Republic
Finally found an answer, with some help from Experts Exchange. Class RenderOptions defines attached property BitmapScalingMode, which can be set to NearestNeighbor. So,
RenderOptions.SetBitmapScalingMode(imageDisplay, BitmapScalingMode.NearestNeighbor);
does the trick.
Zbynek Vrastil
Hate to put a dampener on things, but if NearestNeighbor works like GDI+, then this will give you a limited success. As you increase magnification in areas of high contrast you might not get the desired results. In GDI+ you find blacks becoming blue, and whites becoming red - again I stress in areas of high contrast! If this isn't the case in WPF, think yourself lucky!
Perhaps a WCF developer could confirm that?
I've found that there are more options to consider, but I can only speak for the GDI+ Graphics class, which might be useful to someone.
Graphics graph = e.Graphics;
graph.InterpolationMode = InterpolationMode.NearestNeighbor;
graph.CompositingQuality = CompositingQuality.AssumeLinear;
graph.SmoothingMode = SmoothingMode.None;
This works for me. I think the SmoothingMode is the trick. Hope this helps someone else out there.
I have created a 3D structure(basically an image) dynamically using kit3D.However,I wanted to zoom only a small segment of the whole structure.My entire image is loaded altogather at a time,so I am not considering using deep zoom.
Is there anyway where I can zoom only a part of a dynamically generated image in silverlight??
Thank you,
Ramya
You can use a Scale RenderTransform to increase the size of the image, then use a clip to only show one part of it, thus giving the effect of zoom.
Alternatively you can use a ViewBox from the Silverlight toolkit
I'd use a MultiScaleTileSource for that. It's a callback based system - it requests Deep Zoom tiles from a function you implement when the user zooms or pans.
Here's some sample code, and here's a full working example that pulls map tiles dynamically from Virtual Earth.
This example may be helpful.
there is an example of use silverlight 3 and Virtual Earth on http://www.silverenlightenment.com/