views:

201

answers:

2

I have a question regarding map api.

I was using the the google map api in my website before. But since I have encryption the site using HTTPS/SSL support, the google map api stopped working. I checked online, and realised that google has a Premier account only that would allow me to use HTTPS supported maps api and it cost $10,000 per year.

I do not this kind of money with me. So, can you give any other alternative to have a map api on my website. Anything that could give me driving directions would be fine.

Regards Zeeshan

+1  A: 

You can create a proxy in your webapp that will proxy the requests through to the Google Maps API. This will only work if you're not going to be performing more than 15,000 requests daily (I believe that's the limit). Google throttles by limiting the number of requests to 15,000 per IP.

Vivin Paliath
A: 

I did find out something to using google map api for https:

Can the Google Maps API for Flash be used by a Flash application hosted on an SSL (HTTPS) site? The Google Maps API for Flash can be used in a Flash application (SWF file) that is hosted on an SSL (HTTPS) site. However only Google Maps API Premier customers can load the Google Maps API for Flash over HTTPS. When the Google Maps API for Flash is loaded by a Flash application hosted on an https site using a free Maps API Key, the API is loaded over HTTP, and all connections to Google made by the API are over HTTP. To load the Google Maps API for Flash using a free Maps API key in a Flash application hosted on an SSL site, you must:

1.Use Google Maps API for Flash version 1.9a or later.

2.Add the following to your Flash application before the map is instantiated: Security.allowInsecureDomain("maps.googleapis.com");

Ref:http://code.google.com/apis/maps/faq.html#flash_ssl

As per this i changed my code and the code looks like below:

<mx:TitleWindow  verticalAlign="middle" horizontalAlign="center"
    xmlns:mx="http://www.adobe.com/2006/mxml" 
    xmlns:maps="com.google.maps.*" 
    width="1000" height="600" layout="absolute" backgroundAlpha="0" borderAlpha="0" borderThickness="0" 
    showCloseButton="true" close="PopUpManager.removePopUp(this);">

<mx:VBox width="70%" height="100%" >
                <maps:Map 
                    id="map" 
                    key="ABQIAAAA0L1JEoR6rWjh-BBQnLMtMBSVuZ5VlaqlIqiYPFMK_I5M2UTmHhSq_BJxLHiYcTDW9RxSF6HewNY7uA" 
                    mapevent_mapready="onMapReady(event)"
                    width="100%" height="100%" />
            </mx:VBox>
<mx:Script>
        <![CDATA[
            //import flashx.textLayout.formats.Direction;
            import mx.effects.AddItemAction;
            //import flashx.textLayout.factory.TruncationOptions;
            import mx.controls.Alert;
            import mx.managers.PopUpManager;
            import mx.rpc.events.ResultEvent;
            import com.adobe.serialization.json.JSON;

            import flash.events.Event;
            import com.google.maps.*;
            import com.google.maps.overlays.*;
            import com.google.maps.services.*;
            import com.google.maps.controls.ZoomControl;
            import com.google.maps.controls.PositionControl;
            import com.google.maps.controls.MapTypeControl;

            import com.google.maps.services.ClientGeocoderOptions;
            import com.google.maps.LatLng;
            import com.google.maps.Map;
            import com.google.maps.MapEvent;
            import com.google.maps.MapMouseEvent;
            import com.google.maps.MapType;
            import com.google.maps.services.ClientGeocoder;
            import com.google.maps.services.GeocodingEvent;
            import com.google.maps.overlays.Marker;
            import com.google.maps.overlays.MarkerOptions;
            import com.google.maps.InfoWindowOptions;

            private function onMapReady(event:MapEvent):void {
            Security.allowInsecureDomain("maps.googleapis.com");
              map.setCenter(new LatLng(41.651505,-72.094455), 13, MapType.NORMAL_MAP_TYPE);
              map.addControl(new ZoomControl());
              map.addControl(new PositionControl());
              map.addControl(new MapTypeControl());

              map.enableScrollWheelZoom();
                map.enableContinuousZoom();

            }
]]>
    </mx:Script>
</mx:TitleWindow>

But i still got an error using this.

Any suggestions to what m i doing wrong now.

zee

Zeeshan Rang
I would suggest posting this as a separate question.
Flash84x
Yup, like Flash84x said either post this as a separate question or update your existing question.
Vivin Paliath