World Maps is a Unity package which allows users to add real world LOD maps to their scenes. Just drop the right plane prefab into the scene and configure it so its textures are retrieved from a WMS or a BingMaps server.
To take a look at the possibilities of this package. Just open the scene WorldMaps/Scenes/SampleScene.unity
- Only WMS 1.1.0 has been tested.
- Some WMS servers include restrictions about its use. Check them before using such servers in your projects.
- Drag the prefab WorldMaps/Prefabs/WMSPlane.prefab and drop it into the scene.
- With the plane selected, a WMSTexture inspector should appear on the right.
-
Edit the inspector fields to meet your requirements:
-
Select a server(*) from the bookmarks list or by writting a custom URL and wait a moment for the inspector to load the data from server. If any errors arises, it will be output to both the inspector and the console.
-
Under the "Layers" panel, mark the layer(s) you want to display. Every time a layer is marked / unmarked, the plane texture is updated from server.
-
Under the "Bounding box" panel, select a bounding box from the list provided by the server or insert a custom one. Changes in bounding box doesn't update the plane texture automatically. Instead, the button "Update bounding box preview" must be pressed.
-
Enjoy the new scene with your map!
(*) Important: Remember that some WMS servers include restrictions about its use. Check them before using such servers in your projects.
In order to use BingMaps you need one or two things:
- According to your user case, you may need to get permission from Microsoft to use its API (See Microsoft® Bing™ Maps Platform APIs’ Terms Of Use).
- Generating and using a BingMaps key.
- Get a BingMaps key by following the steps listed in "Creating a Bing Maps Key"
- Visit http://dev.virtualearth.net/REST/V1/Imagery/Metadata/Road?mapVersion=v1&output=xml&key=BingMapsKey, replacing BingMapsKey with your Bing Maps key.
- Visiting previous URL should return an XML file. Copy the image url returned in <ImageUrl>.
- Drag the prefab WorldMaps/Prefabs/BingMapsPlane.prefab and drop it into the scene.
- With the plane selected, a BingMapsTexture inspector should appear on the right.
- Paste the URL retrieved in previous section "Getting a BingMaps key" into the "Server template URL" text field.
- Set both the latitude and the longitude of the point for wich you want to get a map, as well as a zoom level.
- Press "Update preview" to update the scene view with the BingMaps texture and check that everything is OK.