Skip to main content

Microsoft Visual Earth and JXMapViewer: news!

5 replies [Last post]
Anonymous

After a couple of years, I managed in having a meaningful conversation
with Microsoft about the custom use of their maps! This is thanks to a
guy who privately asked me for my TileProvider for MVE and gave me the
correct link.

I've been presented a billing plan for access - which makes sense, I
don't pretend everything is free. Now, I'm trying to understand, hoping
that they will give me a reasonable answer, whether it's legal to
release code that accesses MVE and then the responsibility of opening a
contract with Microsoft is with the user of the code; or the user of the
application itself, if you deliver a package.

PS In the meantime, somebody just released a MVE adapter for NASA World
Wind - going to understand the licensing model and if it can be copied.

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
Fabrizio.Giudici@tidalwave.it - mobile: +39 348.150.6941

---------------------------------------------------------------------
To unsubscribe, e-mail: jdnc-unsubscribe@jdnc.dev.java.net
For additional commands, e-mail: jdnc-help@jdnc.dev.java.net

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
flowolf
Offline
Joined: 2009-02-06
Points: 0

Would you please tell us some more about Virtual Earth and JXMapViewer?
What kind of features are provided? Is it possible to easily create routing paths (like "directions" in Google Maps)? Why have they presented you a billing plan? Take a look here: http://dev.live.com/blogs/devlive/archive/2007/04/30/108.aspx : as long as you are under 3 million map tiles/month Virtual Earth should be free even for commercial use, am I wrong?

scawa
Offline
Joined: 2009-02-03
Points: 0

Your link is interesting. I am developing a desktop app and wonder if the limit applies to the entire application or just to individual IP's.

I don't know if you have looked at Joshua Marinacci's articles about using JXMapViewer/JXMapKit but here's a link

http://today.java.net/pub/a/today/2007/11/13/mapping-mashups-with-jxmapv...

This is the second article in a series, but it has a link to the first article in it. The above article talks about developing mashups between various map servers, and information servers to create map directions.

I'm looking at the SwingX-WS source code to see how they do some of the mashups and checking out how to access the Web Service information that is provided from Google, Microsoft Virtual Earth, Yahoo API's and the WorldWind server in developing my own app. As I learn things, I'll post them in this forum or maybe do a write up on it.

Fabrizio has been talking directly to the MS Virtual Earth guys, so he is the guru on the licensing issues.

Stehen McConnell
"Energy and persistence conquer all things."
-- Ben Franklin

scawa
Offline
Joined: 2009-02-03
Points: 0

I guess lots of minds work alike.

I had just sent an email to their Virtual Earth Evangelist asking he same things and was working on adapting the AbstractTileFactory for use in Virtual Earth.

I am anxious to hear what you find out.

Stephen McConnell
"If you are on time, you're late."
-- My father

Fabrizio Giudici

jdnc-interest@javadesktop.org wrote:
> I guess lots of minds work alike.
>
> I had just sent an email to their Virtual Earth Evangelist asking he same things and was working on adapting the AbstractTileFactory for use in Virtual Earth.
>
>
Mine is available: you can extract it from this class.

*
/*******************************************************************************
*
* blueMarine - open source photo workflow
* =======================================
*
* Copyright (C) 2003-2007 by Fabrizio Giudici
(Fabrizio.Giudici@tidalwave.it)
* Project home page: http://bluemarine.tidalwave.it
*
*******************************************************************************
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*
*******************************************************************************
*
* $Id: MicrosoftVirtualEarthProvider.java 115 2007-11-08 22:04:36Z
fabriziogiudici $
*
******************************************************************************/
package it.tidalwave.geo.viewer.microsoftvirtualearth;

import org.jdesktop.swingx.mapviewer.TileFactoryInfo;
import it.tidalwave.geo.viewer.GeoProvider.ZoomLevel;
import it.tidalwave.geo.viewer.JXMapViewerGeoProvider;

/*******************************************************************************
*
* See
http://www.viavirtualearth.com/vve/Articles/RollYourOwnTileServer.ashx
*
* @author Fabrizio Giudici
* @version $Id: MicrosoftVirtualEarthProvider.java 115 2007-11-08
22:04:36Z fabriziogiudici $
*
******************************************************************************/
public class MicrosoftVirtualEarthProvider extends JXMapViewerGeoProvider
{
private final static int TOP_ZOOM_LEVEL = 19;

private final static int MAX_ZOOM_LEVEL = 17;

private final static int MIN_ZOOM_LEVEL = 2;

private final static int INITIAL_ZOOM_LEVEL = 12;

private final static int TILE_SIZE = 256;

private final static MVEMode MAP = new MVEMode("map", "map", "r",
".png");

private final static MVEMode SATELLITE = new MVEMode("satellite",
"satellite", "a", ".jpeg");

private final static MVEMode SATELLITE_AND_MAP = new
MVEMode("satellite+map", "satellite+map", "h", ".jpeg");

/***************************************************************************
*
*

**************************************************************************/
private static class MVEMode extends Mode
{
protected String type;
protected String ext;

MVEMode (final String name, final String displayName, final
String type, final String ext)
{
super(name, displayName);
this.type = type;
this.ext = ext;
}
};

/***************************************************************************
*
*

**************************************************************************/
private class MVETileFactoryInfo extends TileFactoryInfo
{
MVETileFactoryInfo()
{
super(MIN_ZOOM_LEVEL, MAX_ZOOM_LEVEL, TOP_ZOOM_LEVEL,
TILE_SIZE, false, false,
"", "", "", "");
}

@Override
public String getTileUrl (final int x, final int y, final int zoom)
{
final String quad = tileToQuadKey(x, y, TOP_ZOOM_LEVEL - 0 -
zoom);
final MVEMode mode = (MVEMode)getMode();
return "http://" + mode.type + quad.charAt(quad.length() -
1) + ".ortho.tiles.virtualearth.net/tiles/" +
mode.type + quad + mode.ext +"?g=1";
}

private String tileToQuadKey (final int tx, final int ty, final
int zl)
{
String quad = "";

for (int i = zl; i > 0; i--)
{
int mask = 1 << (i - 1);
int cell = 0;

if ((tx & mask) != 0)
{
cell++;
}

if ((ty & mask) != 0)
{
cell += 2;
}

quad += cell;
}

return quad;
}
};

/***************************************************************************
*
*

**************************************************************************/
public MicrosoftVirtualEarthProvider()
{
super("2D: Microsoft Virtual Earth", INITIAL_ZOOM_LEVEL);
_setTileFactoryInfo(new MVETileFactoryInfo());
registerZoomLevel(ZoomLevel.STREET, 2);
registerZoomLevel(ZoomLevel.TOWN, 5);
registerZoomLevel(ZoomLevel.PROVINCE, 8);
registerZoomLevel(ZoomLevel.REGION, 10);
registerZoomLevel(ZoomLevel.COUNTRY, 12);
registerZoomLevel(ZoomLevel.CONTINENT, 14);
registerMode(MAP);
registerMode(SATELLITE);
registerMode(SATELLITE_AND_MAP);
}
}

*

--
Fabrizio Giudici - Java Architect, Project Manager
Tidalwave s.a.s. - "We make Java work. Everywhere."
weblogs.java.net/blog/fabriziogiudici - www.tidalwave.it/blog
Fabrizio.Giudici@tidalwave.it - mobile: +39 348.150.6941

[att1.html]

mett
Offline
Joined: 2011-07-01
Points: 0

Hello Fabrizio,

thank you very much for your contribute. I'm trying to run the code for showing the Microsoft Tiles, I would like to ask you what should I write instead od mode.type, because I do not know where I can get this function. I mean here: "http://" + mode.type + quad.charAt(quad.length() -1) + ".ortho.tiles.virtualearth.net/tiles/" + mode.type + quad + mode.ext +"?g=1";

Thank you very much for your help, Mett