hi
Its possible to add user controls on the map ie... whether we can add text box button over xamwebmap.if any one know means pls guide me
Do you mean hovering over the map at specific coordinates? Or do you mean hovering over a specific element? Or do you mean positioned in a map layer?
-Graham
Hi,
Hovering over the specific element. Is it possible. If so please give some link for online tutorials
This should behave the same as the shapefiles from my understanding. Is there any sample code you can provide that reproduces this issue?
Actually, I've run some experiments and I'm seeing similar behavior. I will try to determine whether this is a bug with the SQL shape reader, or whether we just don't currently support valuetemplates from this source.
Shapes read from the SQL shape reader are not currently designed to work with the value templates. This is easy enough to work around with this MapLayer.Imported handler:
void MainPage_Imported(object sender, MapLayerImportEventArgs e) { foreach (MapElement ele in xamMap.Layers["USALayer"].Elements) { if (ele is SurfaceElement) { double minX = double.MaxValue; double minY = double.MaxValue; double maxX = double.MinValue; double maxY = double.MinValue; foreach (MapPolyline mpl in (ele as SurfaceElement).Polylines) { foreach (Point p in mpl) { minX = Math.Min(minX, p.X); minY = Math.Min(minY, p.Y); maxX = Math.Max(maxX, p.X); maxY = Math.Max(maxY, p.Y); } } ele.WorldRect = new Rect(minX, minY, maxX - minX, maxY - minY); } } xamMap.Layers["USALayer"].RenderWindow(); }
This help? (Obviously, replace USALayer with whatever your layer name is.)
Great work really working nice.... but the problem is now when i pan the map some elements are not visible if i do zoom in or zoom out only its coming to visible if i do the code suggested by you.
you can see the difference in the following two snapshots
before pan
after pan(in selected area some elements are missing)
Are they visible again if you zoom in further?
Ya the elements are visible again if i zoom in or zoom out...