We are developing a WPF application, mainly using the WPF Bing Maps control.
We have multiple tile layers which can be turned on or off at runtime. The tile layers retrieve their data using a custom tilesource, so we have more control over the uri returned.
When the application starts multiple tilelayers are visible, causing calls to our restservices to retrieve the tiles. The services check the DB for images, if present, return the images, if not, generate the images, store them, and return them. So far it works like a charm.
Now the following 2 cases: DB gets cleared for some reason -> Services just recreate the images when the calls are made, and returns them. No problem here.
If someone clears the IE cache (client side), while the application is still running, zooms / moves around the map. The tiles loaded before disappeared, and are not coming back. When zooming in further, it does retrieve tiles that were not loaded before, but leaves us with big gaps in the tile layer(s).
Only way to solve this seems to be to close the application, clear IE cache, clear DB, and start again. What causes this behaviour? And why are, seemingly empty, images loaded?
After some digging around an option would be to give a tick parameter to the uri, so it will always retrieve new tiles. But this has a major performance penalty.
Any advice on how to solve this problem?
Thanks in advance.
The tile layers in WPF cache the tiles and pulls the tiles from the cache if it has already loaded it once. If the cache is cleared then those tiles will not be reloaded. This is by design for performance. Especially for tile layers that do not have all possible tiles. There is no way around this.
Related
I'm using (or try to) Here Maps for my iOS Application. I just downloaded the example project. Just including the map and a few markers (Same problem without markers).
The problem is, when I try to zoom in our out with the pinch gesture (using the build in function from hereMaps) the tiles turn white with the "here"-Logo on in and it takes several seconds to load the real maptile. Thats waaaay to slow. Compare it to google maps, there is not a single loading tile. I did not changed anything. Don't know what to change anyway, its just a few lines of configuration code.
The question is: Is that the normal behaviour? Is there a few to speed it up?
Testet with several WiFi's. Screenshot attached.
Thanks! :)
I have a silverlight application which different panels, One of the panel contains the ESRI map, I want to print what is coming on the map panel, It's more like a print screen for map (but it should not include rest of the controls of the client application).
On investigation I found that we can use PrintTask but it uses GP server. I do not want to invoke the ESRI service for print.
Is there any other way to print what is coming on the screen (inside the map panel) in the silver light?
Atul Sureka
If you are using the latest version of the Esri Silverlight API, you have access to client side printing. See their example here:
https://developers.arcgis.com/silverlight/sample-code/start.htm#ClientPrinting
It is nice in that it gives you a proper WYSIWYG interface for printing, visibly seeing the extent and can handle custom markers way better than the print service. The downside is though that unless your source map is high enough resolution you'll end up with quite low-res maps unless you perform some kind of map switching when a user triggers the print interface. You'll also need to define print templates in xaml rather than in ArcMap.
It basically boils down to cloning your map and copying all the layers across.
I'm retro-fitting a website for Mobile First Responsive Design (MFRD). My question is - how far do you go with the "Mobile First" part?.
For example - on the homepage I plan on having a list of upcoming events, say 4 or 5. On the mobile version I thought 2 would be enough to save screen real-estate. Should I load the other events in dynamically for the larger views, or should I just hide them since it will only be a few elements anyway?
Loading them dynamically for larger sizes means I have to attach an event to the window resize which typically gets fired every pixel. Even though I can offset that with Timeout, that's still a lot of client side checking is it not (even though it's not like users are constantly resizing their browsers).
I mean, even though you're designing for mobile first, you also have to consider the larger sizes right? Obviously larger JavaScript libraries and other assets that are needed for larger only you want to pull in later and not load for mobile - but how crazy do you want to get with the bandwidth saving?
What is the target market for the website? Are you making a completely responsive website that encapsulates smartphone to desktop? Or are you just concentrating on smartphone to tablet?
Mobile First really just means start your styling and content views at the smallest form factor and work up as the device dimensions get bigger. HTML, CSS (media queries) and jQuery all play a part to expand the UI and manipulate (show/hide) content elements as the browser gets bigger.
Take a look at Smashing Magazine, their responsive layout is one of the most extensive I have seen so far, it will give you an idea of how far you can take the MFRD or DARL (Device Agnostic Responsive Layout) methodologies.
I am trying to build an application which serves images to a Deep Zoom MultiScaleImage dynamically. For example, when an image for a particular corner of the large image is requested, that image should be rendered automatically.
Rendering is what I will implement. But my code needs to be called when the MultiScaleImage requests that corner of the image. How do I implement this?
When I search on StackOverflow for this, I get results that explain dynamic generation of deep zoom images using DeepZoomTools. I am not entirely sure, but this is not I want. I want to generate images only when requested individually and not generate all of them on the fly.
EDIT: Let me give you an example that will explain one of the possible solutions to this, which I don't know how to implement.
If the MultiScaleImage requests the image 5/1_0.png, which if you know Deep Zoom will be the first image in the second column of the large image at 5th zoom level (not related to the real zoom value in deep zoom). When the DeepZoom requests this file, I want to generate it looking at the parameters I have, which are "5", "1", and "0".
#Salil: will do.
You could use routing (e.g. https://web.archive.org/web/20211020111718/https://www.4guysfromrolla.com/articles/012710-1.aspx) to direct the request to a Web Generic handler. Note that a generic handler is a bit more suitable than an aspx page as it doesn't have to do so much work with a page lifecycle.
I am looking for a light-weight map component that displays a map of the US and allows users to click on a State and see information pertaining to that state. The data I want to display is in my database. I just need to know what state was selected so I can display the detail. This is something I am doing to get familiar with Silverlight.
All the searches for Silverlight/ Maps I have done so far have pointed me at solutions that are far more complicated than I need. My perception is that using Bing Maps to do this simple task would a waste of the features provide by Bing.
Anyone know of such a Component? Am I wrong that Bing Maps is not the right tool for the job?
TIA!
If you have access to Expression Studio (specifically Expression Design), creating maps as vector based images is quite easy. Poly-paths in Xaml are also relatively efficient to store and serve up compared to images.
You import a map as a background image and use the pen tool to dot-to-dot trace around the country. Combine all those path segments into a single path. Then create a separate poly-path for each state (close them to allow for a fill).
It will take a few hours to build all this (I know having done this for a world map country selector... took 4-5 hours solid for the one polygon styled below):
By having each state represented by a filled polygon-path highlighting (by changing the fill colour) is trivial on mouse-enter/mouse-leave events.
If you want stylistic map, remove the image, otherwise use transparency on the state polygons to show the map through the roll-overs.
Update:
And if you get yourself a graphic tablet and pen this sort of point-to-point work is about 5 times faster than with a mouse!
The interaction with Bing Maps in Silverlight is really strong and provide you with easy communication between the map and your data. I would give Bing Maps a try.
I'm not sure if you've already come across this, but it seems you can also use the control with custom tile sources. Here are a few resources.
http://www.cadmaps.com/gisblog/?p=54
http://developers.de/blogs/damir_dobric/archive/2009/11/16/implementing-custom-map-in-silverlight-map-control.aspx
http://labs.mandogroup.com/skinning-the-silverlight-bing-maps-control/
Custom Rendering in Bing Silverlight Control