Bing Maps Layers - silverlight

I've been working with bing maps in Silverlight recently and have things at a good working order. One quirk that I would like to resolve is that all of my shapes that are drawn on the page get rendered on top of the road layer and even worse, the city names. So if my shapes are opaque, you can't read them. I'm figuring that there must be some z-index type property involved but I'm having a hard time finding any information about it.
Does anyone know how to set the stack order of the layers provided? Is there a particular index of the existing layers (roads, street names, city names and so on)?

Don't think so. The base Bing map layers (map, aerial, aerial with labels) are just prebuilt tiled images. Shapes added will be on top of those images.

Related

How to load a open street map from local source?

I'm using the wpf map control of DevExpress 15.1.5 and I'm trying to load a map from a local source.
DevExpress's help allows me to download a .osm file of a selected map area by me, but I can not load a .osm with this control; it only supports .kml and .shp.
What can I do?
You need to download map data in a different format, see. :
OpenStreetMap data
I recommend the first download a small country and try it if that's what you need.
Map consists of multiple layers, which together form "what you see". Layers are buildings, roads, places, waterways,landuse ... and are formed by shapes *.shp file (eg. Building plan, the route of the road ...)
You can view video here:
https://www.youtube.com/watch?v=4vlEzX9Q15Y&t=6s
also the source code is available in github.
the Control works on local OSM tiles
it is written in C#
I created OSM MAP Control which have the following functionalities:
1. Accurate Zoom with the mouse wheel.
2. Move left , up ,bottom and right
3.if tiles are missing , it ask to start download those missing tiles.
4. Create line on the map
5.save history by friendly name
6. you can download area of tiles - with zoom.

Is there a way to cluster leaflet markers with similar properties ?

I create my layers from geoJson, which has specified adress among other things.
I understand that grouping is done based on distance between them and current zoom to map. I want to achieve that markers on one street stay grouped(clustered) even on max zoom and implement layer.spiderify on click (which I have by now).
I searched pages and examples Im quest for finding the answer for few days and now I turn on stack for a hunt.

Efficiently display multiple markers on WPF image

I need to display many markers on a WPF image. The markers can be lines, circles, squares, etc. and there can be several hundreds of them.
Both the image source and the markers data are updated every few seconds. The markers are associated with specific pixels on the image and their size should be absolute in relation to the screen (i.e. when I move the image the markers should move along with it, but if i zoom in, they should take the same space of the screen as before).
Currently, I've implemented this using the AdornerLayer. This solution has several problems but the most significant one is that the UI doesn't fare well under the load even for 120 such markers.
I wanted to ask what would be the best way to go about implementing this? I thought of two solutions:
Inherit from Canvas and make sure it is invalidated not for every
added marker but for a range of markers at once
Create a control that holds an image and change its OnDraw to draw all the markers
I would appreciate some pointers from someone with experience with a similar problem.
Your use case looks quite specialized, so a specialized solution seems in order. I'd try a variant of your second option — extend Image, overriding its OnRender method.

Adding hundreds of pushpins programatically to bing maps freezes the WP7 UI

I'm working on a WP7 app that uses bing maps to display ~600 pushpins. When i add them to the map using map.Children.Add(pushpin) the UI freezes for ~200 ms. I've seen that in silverlight you can use Microsoft.Maps.EntityCollection to add pins to a map but unfortunately I couldn't find how to use the assembly on WP7. Does anyone know a solution to this?
Maybe you're looking at the problem the wrong way round. WP7 is a compact (though powerful) that excels at showing the user what they want to know quickly (when the apps are written properly).
The user can't possibly see 600 pushpins in one go on a device that small, so why not just show them pushpins that are in the viewable area (or close to it) and add pushpins as the user pans around the map?
Alternatively you could "trickle" feed the pushpins by adding them one (or more) at a time using the DispatcherTimer so that the user sees pushpins being gradually added without drastically affecting performance.
Another possibility (which is what I usually do) is to add a MapItemsControl with the DataTemplate set to a Pushpin and to bind the collection to your collection of pushpin locations. If the binding is to an ObservableCollection you can "trickle" feed it as mentioned above if perf is an issue.
In a viewpoint similar to Derek's, I find it highly unlikely that you seriously want to put 600 pins on the screen at the same time. I'm guessing that they span a large geographic area and the user is unlikely to see more than a handful at a time.
If this is the case, you can trivially apply a cliprect to cull your points, then add the resultant modest list to a layer, and Presto! High performance.
In addition, there is the issue of what to do when the user zooms a long way out, bringing so many pins into view that they merge into one big useless but brightly coloured blob. This is a more complex problem traditionally solved with a quadtree, and I have a suspicion that you just said "a what?" but luckily Google is your friend.
Oh, and to address your stated problem - don't add the pins directly to a map. Add them to a MapLayer and then add that.

Store large image

I'm looking for a way to store a very large image (e.g. 100.000x100.000 pixels) on a webserver. I must be able to retrieve parts of that image and write parts into it. The cherry on top would be a way to get parts of that image, resized to a specific resolution (for example, i want alle pixels from 0,0 to 10.000,10.000 resized to 1000x1000 pixels).
Anybody know a kind of DB, or a data-structure or any other way or service or programm that can handle something like that?
thx, tux
How about Tiles?
Just like what popular mapping application (Google Maps / Bing Maps ) does. Divide and pre-process your image in to tiles for various sizes (zoom levels). Display them on a webpage with zero margin, zero border.
While retrieving, calculate positioning of tiles (which tiles should be retrieved as whole and which ones as partial) and then return as single image.
http://143.117.54.5/idl/images/img_pyrm.gif
(image ack: http://143.117.54.5/idl/Image_Tiling.html)
Search for "map servers": there are a bunch of them already available. I'm sure they at least contain components that might be of interest for you.

Resources