View Full Version : Google map in a panel


06-16-2013, 06:52 PM
I have been attempting to use the Open Web Page Super Control (Google Map) to open a map to a contact's address shown in the current panel. I have a list control that has the fields with the address and used those. If I select to open it in a window, the map opens to the correct address, but is too big to see on an IPhone. I thought that selecting to open it in a Panel might work better, so I created another empty panel for that. When I select to open the web page in a Panel, and then select the empty panel name, and then run it all, I get a script error message that says 'panelld is undefined'.

Screenshot of the error: http://screencast.com/t/vUBcGBOWTL
Screenshot of the Action Javascript genie stuff for the super control: http://screencast.com/t/xnIH3dssa

Any thoughts for me?

06-16-2013, 07:44 PM
Why would you use a supercontrol ? That is unless I'm mistaken old legacy stuff. Use a UX map control

06-16-2013, 08:23 PM
I would be happy to use a UX map control if that's what I need, but I'm too much of a newbie to ux to figure out how to do that. Looked for a video or help and am not finding. All the javascipt action stuff I click on that might be something that sounds like a map control wants a map id or name... And I'm not sure where that's supposed to come from. Frank, do you know where help can be found for this?

06-16-2013, 08:25 PM
Hi Carol,

Maybe these will be of help

06-16-2013, 09:41 PM
Thanks, Bruce. I started watching the video, but it seems like you have to have some named map first (right away Selwyn is selecting a map in the video), and then it seems like you have to have latitude and longitude to place a marker. In my case, I have an address (street, city, state, zip) in fields and I want to just open a map that finds that address. Can someone suggest the best tool for this?

06-16-2013, 09:43 PM
Well, my bad... I am watching farther and see that you can use an explicit address. I'm still puzzled about selecting a map name, tho.

06-16-2013, 10:00 PM
OK, I'm getting it now. Had to put a Map control into a panel first, so I can refer to it. Thanks so much for the pointers all!

06-16-2013, 10:19 PM
I have dug this out http://wiki.alphasoftware.com/geocode_address+Function
But sounds like you have it sorted.

06-17-2013, 10:27 AM

Yep that's it! You're on your way now!

06-17-2013, 12:58 PM

Just created this component that does what you want; v12 mobile stuff really is amazing!


06-18-2013, 02:52 AM
That is a nice little sample Frank, thanks for sharing

See I always go " That is cool ... but now I want it to do this..."
And this is where I hit walls.

That demo looks great in Iphone vertical preview but of you change to horozontal... or ipad... the map does not change size.
So I thought 'cool I can do this'
But that is for Charts and that feature has only JUST been added.

Am I missing something? does anyone know a way to resize maps to fit their container?
I asked this same sort of question way back here in v11 Seems to me there is no way to make a map resize to the pannel or what ever container it is in.



06-18-2013, 03:46 AM

This was just a quick & dirty sample created in no more then 3 minutes (!) to hint Carol away from the old legacy stuff. I'm flooded with work now but in a free minute I'll update it to more detail; I can only learn from doing that!

06-18-2013, 03:57 AM

This was just a quick & dirty sample created in no more then 3 minutes (!) to hint Carol away from the old legacy stuff. I'm flooded with work now but in a free minute I'll update it to more detail; I can only learn from doing that!
Hi Frank,

Sorry I know it was a quick and dirty, it is it just lead me to the pondering this. We are all learning this new UX stuff.

06-18-2013, 04:05 AM
>>We are all learning this new UX stuff

Yeah! Especially the mobile part, I find it so intuitive & easy that I can hardly believe it.

06-18-2013, 11:49 AM
Hi All,
Here is a little mod to the sample posted by Frank

After getting some sample code from Selwyn on re-sizing maps in a dialog... I find out that there is an even better method when using panes and containers!
There is a property called "Fill Container" that Map controls have... like List controls

Works a treat! except that then I found I could not swipe back to panel_1 as the map was taking control so all I was doing was moving the map...
But then remembered one of Selwyns videos...I added a little custom onSwipe code

if(e.swipeDirection == 'right') {
(Which is part of the template code in the builder help)

So now map re-sizes and you can swipe back nicely
Anyway, I thought I would share the results of my playing.

I would have re-posted the modified component but it seems I can upload files, just images


06-18-2013, 12:03 PM

That's the spirit! Sharing & learning from one another! Thx!

06-19-2013, 08:03 AM
Just popped into message board and found the added posts here. Did not get an email about these. ANYWAY, thanks so much for the info. The Fill Container was an excellent pointer, Bruce! And, Frank, I couldn't have done this without your nudges.

06-25-2013, 03:41 AM
I took things a bit further and I agree that the new interface is extremely intuitive.

What I did was insert a container with static text "GOOGLE MAP" just above the [map1] component and set the sub-type of the container to PANELHEADER.

My UX looks like this for the second panel card section containing the map:

[Panel Card[PANELCARD_2]
[StaticText:Google Map]
[Panel Card End[PANELCARD_2]]

Now you get a map that fills the screen in either orientation and still have a header that you can use to swipe back to the previous panel. I'd upload a graphic but the message board seems to be struggling with allowing uploads at the present time.

06-25-2013, 07:35 AM
I added the code for swipe at Panelcard_2 and also tried at Navigator, Panelcard_1
but does not take me back!

06-27-2013, 07:18 PM
Now that attachment uploading is fixed, here's the changes I made to the carol_test in order to allow swiping back to the list from the map panel.

06-28-2013, 12:26 PM
Here's the updated component file which allows swiping to and from the full map screen. Special thanks to Alpha for adding the "fill container" option for maps!


01-03-2016, 12:38 PM
If I might chip in here, I am sitting with the same scenario. I would like to populate a google map with longitude and latitude from a table. I am new to Alpha and I have gone straight to using ux controls for all my lists and details views. I have now created a panelcard where the google map is located.
My problem now is that how do I get the markers onto the map from the mssql table, and how do I put my present location onto the map as this will be running on a mobile device.
All the videos show grids with alternate views. Is there a video that shows a UX example?

Any pointers...appreciated



01-03-2016, 12:58 PM
Add a button, look in the onclick event for javascript actions related to maps, that should get you started.

01-03-2016, 01:53 PM
Thanks Charles,

Got it going set up data series etc. Record set only returns 30 records but when I click the button I get an error "Message from Webpage" - "Stack overflow at line: 47"
Any ideas?

01-03-2016, 03:05 PM
I can center the map to a lat long and place a marker there. That works fine.
But trying to add markers from a data series crashes with the stack overflow.
Is this a bug?...