Reimers.dk

.NET, AJAX and Google APIs brought together
Welcome to Reimers.dk Sign in | Join | Help
in Search

Jacob Reimers Weblog

Version 4 Beta

I would have liked to have this new version ready for the new year, but sadly it is not quite ready for showtime :-( It is however pretty exciting so it is being released as a beta.

The biggest news for version 4 is the ability to define your map using markup alone. This has been something that has been on the todo list for a while, but it's no trivial issue to get all the properties to display properly so you get full Intellisense help when defining your map. While it does not offer any added functionality as such, it does make it a lot easier to define maps for beginners.

Below you can see the page definition for a basic map - there is no code behind.

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

 

<%@ Register Assembly="GoogleMap" Namespace="Reimers.Map.Static" TagPrefix="Reimers" %>

<%@ Register Assembly="GoogleMap" Namespace="Reimers.Map" TagPrefix="Reimers" %>

<%@ Register Assembly="GoogleMap" Namespace="Reimers.Map.Controls" TagPrefix="Reimers" %>

<%@ Register Assembly="GoogleMap" Namespace="Reimers.Map.CustomMaps" TagPrefix="Reimers" %>

<%@ Register Assembly="GoogleMap" Namespace="Reimers.Map.Geocoding" TagPrefix="Reimers" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

    <div>

        <Reimers:GoogleMap runat="server" GoogleKey="YourGoogleKey">

            <Options>

                <MapTypes>

                    <Reimers:GoogleTerrainMap />

                    <Reimers:GoogleNormalMap />

                </MapTypes>

            </Options>

            <MapControls>

                <Reimers:GoogleSmallMapControl ID="smc">

                    <Position Anchor="G_ANCHOR_BOTTOM_RIGHT">

                        <OffSet Height="10" Width="10" />

                    </Position>

                </Reimers:GoogleSmallMapControl>

                <Reimers:GoogleSmallMapTypeControl ID="smtc">

                    <Position Anchor="G_ANCHOR_TOP_LEFT">

                    </Position>

                </Reimers:GoogleSmallMapTypeControl>

            </MapControls>

            <ClientSideHandlers OnDragEnd="alert(this.getCenter().toUrlValue());" />

        </Reimers:GoogleMap>

    </div>

    </form>

</body>

</html>

The markup support also goes for static maps as you can see below:

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>

 

<%@ Register Assembly="GoogleMap" Namespace="Reimers.Map.Static" TagPrefix="Reimers" %>

<%@ Register Assembly="GoogleMap" Namespace="Reimers.Map" TagPrefix="Reimers" %>

<%@ Register Assembly="GoogleMap" Namespace="Reimers.Map.Controls" TagPrefix="Reimers" %>

<%@ Register Assembly="GoogleMap" Namespace="Reimers.Map.CustomMaps" TagPrefix="Reimers" %>

<%@ Register Assembly="GoogleMap" Namespace="Reimers.Map.Geocoding" TagPrefix="Reimers" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"

    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head runat="server">

    <title></title>

</head>

<body>

    <form id="form1" runat="server">

    <div>

        <Reimers:GoogleStaticMap runat="server" Zoom="10" MapType="Terrain" GoogleKey="YourGoogleKey">

            <Center Latitude="51.5" Longitude="0.0" />

            <Overlays>

                <Reimers:GoogleStaticMarker ID="m" Letter="L" MarkerColor="Red" MarkerSize="Mid">

                    <Point Latitude="51.5" Longitude="0.0" />

                </Reimers:GoogleStaticMarker>

                <Reimers:GoogleStaticPolyline ID="p" LineColor="Blue" Opacity="0.7" Width="4">

                    <Points>

                        <Reimers:GoogleLatLng Latitude="51.5" Longitude="0.0" />

                        <Reimers:GoogleLatLng Latitude="48.85" Longitude="2.3" />

                    </Points>

                </Reimers:GoogleStaticPolyline>

            </Overlays>

        </Reimers:GoogleStaticMap>

    </div>

    </form>

</body>

</html>

As I mentioned above this is still not quite ready for release, but if you want to test it for yourself (and possibly give some feedback), then you can get the source at svn://svn.reimers.dk/map4beta.

Published 6. januar 2009 19:49 by jjrdk

Comments

 

Jacob Reimers Weblog said:

It took a bit longer than I would have wanted, but now version 4 is out. So why the new version number? When version 3 was launched there was a change to the object model so that it would closely mirror the underlying JavaScript API (Google's Maps API).

februar 1, 2009 17:43
 

Benshoshan1 said:

I have been using your product for about a year now and would love to integrate version 4 into my software.  As I understand the A to B Get Route feature is only available in version 4.  How can we get it?  I attempted to download and received an error that the file was damaged.  Please send me instructions on how to obtain this new version and the cost, if any to upgrade (the website did not indicate a fee).

marts 19, 2009 19:15
 

jjrdk said:

I'm sorry you are having trouble with the download. If you send an email to reimers@reimers.dk, I will send you the latest version. Otherwise, if you are using SVN, you can get the latest source files from svn://svn.reimers.dk

marts 19, 2009 20:21
 

Benshoshan1 said:

Thanks just sent an email.

marts 19, 2009 22:40
Anonymous comments are disabled