You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@flex.apache.org by sam991 <sa...@firmwisegroup.com> on 2014/05/19 08:06:50 UTC

Google Map Javascript v3 API in Flex

Hi everyone,

How can i use Google Map Javascript v3 API in my Flex desktop application. I
have seen some example but they were using stageWebView to display map. But,
in this case i won't be having any control over the map.
So, i want some thing else



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Google-Map-Javascript-v3-API-in-Flex-tp6480.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Google Map Javascript v3 API in Flex

Posted by Peter Ent <pe...@adobe.com>.
You can use HTMLLoader with AIR applications. I've just used it with a
FlexJS application example and it works well. You need to follow Google's
suggestion for asynchronously loading their JavaScript API and supply a
callback, but once that has been invoked you can easily use the Google
Maps API.

Peter Ent
Adobe Systems

On 5/19/14 2:06 AM, "sam991" <sa...@firmwisegroup.com> wrote:

>Hi everyone,
>
>How can i use Google Map Javascript v3 API in my Flex desktop
>application. I
>have seen some example but they were using stageWebView to display map.
>But,
>in this case i won't be having any control over the map.
>So, i want some thing else
>
>
>
>--
>View this message in context:
>http://apache-flex-users.2333346.n4.nabble.com/Google-Map-Javascript-v3-AP
>I-in-Flex-tp6480.html
>Sent from the Apache Flex Users mailing list archive at Nabble.com.


Re: Google Map Javascript v3 API in Flex

Posted by Alain Ekambi <ja...@gmail.com>.
You will have to Play with CSS
 I will opensource how we did it but its in Java though
Am Montag, 19. Mai 2014 schrieb sam991 :

> It worked thanks, but my map is coming at the bottom of my page..
> How can i make it available in whole page?
> <http://apache-flex-users.2333346.n4.nabble.com/file/n6492/1.png>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Google-Map-Javascript-v3-API-in-Flex-tp6480p6492.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>


-- 

Alain Ekambi

Co-Founder

Ahomé Innovation Technologies

http://www.ahome-it.com/ <http://ahome-it.com/>

Re: Google Map Javascript v3 API in Flex

Posted by sam991 <sa...@firmwisegroup.com>.
It worked thanks, but my map is coming at the bottom of my page..
How can i make it available in whole page?
<http://apache-flex-users.2333346.n4.nabble.com/file/n6492/1.png> 



--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Google-Map-Javascript-v3-API-in-Flex-tp6480p6492.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Google Map Javascript v3 API in Flex

Posted by Alain Ekambi <ja...@gmail.com>.
This is because you cant (normally) iframe http://maps.google.com/.
You need to point the FlexIframe component to an html file that loads to
Google Maps API for JS. Then use External Interface to access the maps.

Something like

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
xmlns:s="library://ns.adobe.com/flex/spark"
xmlns:flexiframe="http://code.google.com/p/flex-iframe/"
xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%">

        <flexiframe:IFrame id="map" source="http://<http://maps.google.com/>
*myMap.html*" width="100%"
height="100%" />
</s:Application>

and inside myMap.html

you follow :

https://developers.google.com/maps/documentation/javascript/tutorial#HelloWorld

Cheers




2014-05-19 9:19 GMT+02:00 sam991 <sa...@firmwisegroup.com>:

> As per your reply i have used this code to display map in my browser with
> my
> flex application
>
> <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
> xmlns:s="library://ns.adobe.com/flex/spark"
> xmlns:flexiframe="http://code.google.com/p/flex-iframe/"
> xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%">
>
>         <flexiframe:IFrame id="map" source="http://maps.google.com/"
> width="100%"
> height="100%" />
> </s:Application>
>
> but this displays a blank page and nothing else..
>
>
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Google-Map-Javascript-v3-API-in-Flex-tp6480p6488.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>



-- 

Alain Ekambi

Co-Founder

Ahomé Innovation Technologies

http://www.ahome-it.com/ <http://ahome-it.com/>

Re: Google Map Javascript v3 API in Flex

Posted by sam991 <sa...@firmwisegroup.com>.
As per your reply i have used this code to display map in my browser with my
flex application

<s:Application xmlns:fx="http://ns.adobe.com/mxml/2009" 
xmlns:s="library://ns.adobe.com/flex/spark" 
xmlns:flexiframe="http://code.google.com/p/flex-iframe/" 
xmlns:mx="library://ns.adobe.com/flex/mx" width="100%" height="100%">
	
	<flexiframe:IFrame id="map" source="http://maps.google.com/" width="100%"
height="100%" />
</s:Application>

but this displays a blank page and nothing else..





--
View this message in context: http://apache-flex-users.2333346.n4.nabble.com/Google-Map-Javascript-v3-API-in-Flex-tp6480p6488.html
Sent from the Apache Flex Users mailing list archive at Nabble.com.

Re: Google Map Javascript v3 API in Flex

Posted by Alain Ekambi <ja...@gmail.com>.
We do use the FlexIframe component for that.
Works very well.


2014-05-19 8:06 GMT+02:00 sam991 <sa...@firmwisegroup.com>:

> Hi everyone,
>
> How can i use Google Map Javascript v3 API in my Flex desktop application.
> I
> have seen some example but they were using stageWebView to display map.
> But,
> in this case i won't be having any control over the map.
> So, i want some thing else
>
>
>
> --
> View this message in context:
> http://apache-flex-users.2333346.n4.nabble.com/Google-Map-Javascript-v3-API-in-Flex-tp6480.html
> Sent from the Apache Flex Users mailing list archive at Nabble.com.
>



-- 

Alain Ekambi

Co-Founder

Ahomé Innovation Technologies

http://www.ahome-it.com/ <http://ahome-it.com/>