Is there a part of the api for access different map layer data such as population heat maps, county boundaries or zipcode lines?
I know this is mostly handled by people like ESRI/ArcServer but I was curious is there was some way to get similar information on the phone platform.
At this point, the only way i see it, is to have a huge data set, parse it, and draw the polygons myself. This sounds extremely time consuming on a phone.
Sadly Google, Bing Maps et al. don't expose access to their datasets in anything other than the pre-defined road, satellite styles etc. As tghamm suggests, your best bet for a performant solution on a mobile device is not to draw dynamic polygons, but pre-render your own raster tilesets for the area/zoom levels at which you want to display the data and display these as a custom tile layer ontop of the map control.
A good toolchain for creating such a tileset is:
1.) Use SQL Server Express (or PostGIS, if you prefer) as backend spatial DB - http://www.microsoft.com/express/sql/ ($0)
2.) Get necessary data in shapefile format - http://www.diva-gis.org/Data ($0)
3.) Load the shapefile data into SQL Server - http://www.sharpgis.net/page/shape2sql.aspx ($0)
4.) Write a query to retrieve the necessary information from SQL Server (or retrieve it directly from shapefile) and render it to tiles using Mapnik - http://www.mapnik.org ($0)
Total cost, $0.
Also, be sure to check out open street map - http://osm.org, which provide access to their entire database that you can download and render yourself - in many areas of the world (although not all) it beats both Google and Microsoft in quality and completeness of its data.
Often this data is delivered through use of a tile server, where the geometries are rendered on a server and then cut into tiles so that the client is only responsible for consuming the raster data. There's plenty of places to get good imagery:
http://www.census.gov/geo/www/tiger/
This is a good starting point for your basic geo-political shapes in the US.
From there, there are third party libraries capable of assisting you with consumption of those SHP files directly, such as http://www.thinkgeo.com/.
Alternatively, some people choose to upload the contents of the shp file into a db structure that supports spatial types. I've used Sql Server 2008, which is complimented by some .Net libraries to facilitate shape handling and manipulation for rendering.
Finally, there are likely a good number of open tile servers out there with useful data layers that you need only understand the tiling pattern to consume, e.g. WMS.
Related
As part of a project, I have to develop a offline C# application that can calculate the distance and journey time between two points. I'm planning on using data from OpenStreetMap but I'm not too sure what the process would involve. I do not want to use OSM's API but rather develop my own backend, to ensure continuity in case someone else decides to pick up the project to improve it. I have several questions:
Where do I download a full map of the United Kingdom from the website?
How would I overlay the postcodes, addresses, places of interests onto the map?
How would this information be read by the C# application (i.e. when the user enters point A or B, it should be pulled from a central database and automatically calculate the distance and journey time between both)
I want the information to be stored on the client side, without the need for a server - is this possible?
Please ask only one question at a time.
Question 1: OSM offers various ways for downloading data. In your case you should download a country extract.
Question 2: For displaying a map either use raster tiles or vector tiles. But before that you should decide whether you want to render your own tiles (in which case you will need some kind of tile server) or use available tiles from the web (in which case you will need constant access to the web).
Question 3: Ideally your C# application will just query a local PostgreSQL/PostGIS database.
Question 4: Which information? Everything? That would require lots of resources on the client for storing and querying the data.
I've spent most of the Christmas reading through the Bing Maps information. However, there are so many different options and choices that I'm getting stuck on the plentifulness.
In one of the most obvious URLs I see both non-API and API approaches. That's confusing. There are AJAX, REST and Spacial Services and, to the best of my understanding, they do pretty much the same. That's confusing too... :)
So, here's the question. I'd like to create a web page that given a certain input (e.g. XML or JSON) will provide me with an image. The image is supposed to be a map with plotted pins (that contain my descriptions), controls for zoom/pan and (preferably) even traveling routes (automatically computed or provided by me) between those pins. Also, It'd be great if I could set a semi-transparent polygons covering some areas.
Which API am I supposed to use?!
I sis something like that a few years ago with Google Maps but as far I recall, I only sent in a XML file and the map was hosted more or less at Google's.
If you're building a web site, then you'll have to choose between the AJAX Control and the REST services. Basically, the AJAX Control allows you to embedded a map in your page, add pushpins, draw shapes, display routes...etc.
See http://www.bingmapsportal.com/ISDK/AjaxV7#CreateMap1 for a live demo.
The REST services are more useful for tasks simple like static imagery as well as requests like (reverse)geocoding and routing, that don't involve user interaction.
If you want a full "map control" that allows the user to interact with keyboard/mouse, use the AJAX API. If you're not, REST services could be enough.
EDIT:
AJAX API = AJAX control = AJAX v7
Spatial Data Services is a REST API that allows to compute spatial requests against a large number of data. It shouldn't be used to display a map.
If you're interested in something that allows your users to pan/zoom, create pushpins by clicking on the map...etc., then the AJAX control is the most suitable. It offers all the javascript stuff to display a dynamic map that allows user interaction.
If your XML file is in GeoRSS or GPX format then take a look at the modules for Bing Maps here which show you how to do this in a few lines of code: https://bingmapsv7modules.codeplex.com/
If your XML file is a custom format then take a look at the GeoRSS module to see how to read XML in JavaScript.
If you have more than a thousand items in your XML file I would highly recommend storing your data in the Bing Spatial Data Services which will expose it as a spatial REST service, or uploading it to a database and using a web service to load the data to the map. Loading more than 1,000 pushpins to a JavaScript map could be slow. Using a service you can load only the data that is in view which would make your app much faster.
Basically functionality i need is:
easy integration with ASP.NET application.
user ability to crop image with handle prior to save
image optimization from any image type to jpg (compression levels) during the save
saving images with proper h/w ratios during the save
user ability to rotate the image prior to save
ability to translate application to foreign language as it won't be used on international site
If you know any application which fits my needs even if it costs money, give me a twit...
Our company has implemented a photo cropper in an ASP.Net MVC application using Atalasoft's DotImage. I did not implement this myself, but I currently maintain the whole of that application (and consequently the cropping component).
Based on the way you phrased your question, I feel that I should explicitly point out that Atalasoft's DotImage only provided the functionality to manipulate images. Other answers referenced ImageMagick and GDI+. In the same vein, these libraries also only provide the functionality to manipulate images.
We had to implement the UI and workflow ourselves. This was, while not rocket science, still far from trivial. While we used a pre-built component for fancy, AJAX-y file uploads (for the source photos) - we still had to integrate that into the application and manage persistence of the files and database records associated with them. (Similarly, as a convenience we allow import photo from url - another feature we had to explicitly create)
I would suggest that you will not find any general purpose component to integrate that will give you cropping functionality and a Web UI. I suppose there may be one made by a ASP.Net component vendor, but I am certainly not aware of any off-hand.
The problem tends to involve lots of pieces that span from the client to the server, and consequently I think what you are looking for will involve a fair amount of specific-to-your-application development and integration.
You can try ImageMagick, it supports hundreds of image formats and it comes with a .NET wrapper.
Have found exactly what i was looking for iLoad
Does exactly what i asked and doesn't cost that much compared to other suggested solutions. Haven't tried it yet but demo is impressive.
Have a look at mcImageManager
I would like to have two streams. One being traditional streaming video and another being text. I will also build an interface that allows the user to create the text portion while watching the video. The context of these videos are usually that of an individual being filmed doing a presentation and later the next day for example, a coach will make text annotations (structured data is a plus) with the result being the text stream.
It seems this is possible with Silverlight (see the article in the latest MSDN). However, what other methods are there if any? If there any, please give the reasons for why you are recommending them. Thanks.
Also, I would prefer something that inst a software as a service hosted solution, but, dont let that keep you from giving an answer. Also keep in mind, the user shouldn't have to do any re-encoding of the video source, the text stream should be separate with someway to synchronize a coach's comments to an arbitrary time stamp in the video.
http://slvideoplayer.codeplex.com/ This project has good support to show markers based on video time-line. It is currently built using SL2 but you can upgrade this to SL3 easily.
I want to write a GUI seating application that allows users to draw and annotate simple "maps" of seating areas.
The end result would probably look something a little like Visio, but specifically for manipulating my "seating" data model rather than producing files.
In Java-land, there's the Graphical Editing Framework (GEF) -- is there anything like this in the .NET space? Should I just use System.Drawing.Drawing2D primitives and handle it all myself?
Here is product from Nevron. It is paid but doing it all yourself will take lot of time and effort.
Open Diagram and EasyDiagram.net are available at Codeplex. Be sure to download and look into their code.
There is Netron Library for diagramming. It is open source and uses GDI+.
Check out NShape. It is an open source diagramming framework written in C# and quite powerful. Its controls are WinForms controls but you can also use it for WPF.
You might consider using the DSL Toolkit from the Visual Studio SDK. It allows you to create a graphical DSL designer by first creating a domain model, and then creating the graphical notation that will allow users to create or edit instances of that model.
You may very well be able to create a graphical notation that looks like a seating area. This would allow your users to not only "diagram", but to produce a file containing a filled-in domain model of what was diagrammed.
Check out our MetaDraw component - www.MetaDraw.com
MetaDraw is designed to make applications like this easy.
MetaDraw will support a background image and an annotation layer
You can put users into a variety of editing modes - Lines, Curves, Text, Shapes, etc.
Every drawn element is distinct - just like in Visio, so you can allow users to select objects and move them around or resize them. Every object can have multiple hidden tags ( like seat numbers or database record pointers ). You can recognize which objects users select ( for instance take some action when user clicks seat 22 ) . You can dynamically modify propertie by code - such as searching for seat 22 and changing it's fill color. Of course you can also scroll, zoom, print, save to a variety of formats and more.