Jump to content

Google Maps for uniGUI


lema

Recommended Posts

[OFF]

 

I'm testing a kml file, no online demo works, no console demo shows show
 
 
preview /**/_xdc_._pfk19i && _xdc _._ pfk19i ([0, null, null, null, null, null, 2, [["cliente", "2"]]])
resposta /**/_xdc_._pfk19i && _xdc _._ pfk19i ([0, null, null, null, null, null, 2, [["cliente", "2"]]])
 
 
do not load, I already released the key in the google console
Link to comment
Share on other sites

 

[OFF]

 

I'm testing a kml file, no online demo works, no console demo shows show
 
 
preview /**/_xdc_._pfk19i && _xdc _._ pfk19i ([0, null, null, null, null, null, 2, [["cliente", "2"]]])
resposta /**/_xdc_._pfk19i && _xdc _._ pfk19i ([0, null, null, null, null, null, 2, [["cliente", "2"]]])
 
 
do not load, I already released the key in the google console

 

 

Hello, maybe this can help you.

http://forums.unigui.com/index.php?/topic/2363-google-maps-for-unigui/page-3&do=findComment&comment=11108

Link to comment
Share on other sites

Hello,

the MarkersEx is a dynamic array of TMarkerEx.

So, you have to allocate storage.

 

e.g.

You can use something like the following

 


while Not DTM.Vehicule.Eof do
  begin
  SetLength(MarkersEx, High(MarkersEx) + 2);
 
   with MarkersEx[High(MarkersEx)] do
                begin
                  id := DTM.VehiculeRECORDID.Value;

................

                 icon := '/files/images/45.png';

                end;
                UniGMap1.AddMarkerEx(High(MarkersEx)], True);
    DTM.Vehicule.Next;
  end;
end;

 

Link to comment
Share on other sites

Hello lema:

 

There is a bug with clusters and markersEx due to recent google maps API changes.

Now, the clusters won´t appear and a Ajax error pops: "Cannot read property 'removeChild' of null"

You can open your own online demo and click the button: "Marker Clusterer", and then, click the "Add markersEx" and the error will show up.

 

Greetings

 

 

Confirmed.

I will check it out when I have time.

Link to comment
Share on other sites

Hello Lema !! Hello UniGUI users !!  :)

 

First of all, thank you very much for this work, I haven't tested it entirely yet, but I am just starting ;D

 

It seems that I encounter this same problem...

 

Hi!

 

I use component in my web application. But Gmap sometime show but mostly don't. When I get blank Gmap I try to see what heaped with Firefox page debuger and I see error : "Uncaught ReferenceError: google is not defined "

 

What I can do to get Gmap any time when open form...

 

Any idea?

 I am basically just doing this in my OnFormShow:

  UniGMap.InitializeMap;

EDIT: This is apparently resolved if you put a uniGMap component on your Main form and disable it + invisible.. but I always have to close my project session and re-log in order to properly load google component .. :/

 

Ps: Is your address still good ? (For your post card collection ^^)

Link to comment
Share on other sites

Hello Lema !! Hello UniGUI users !!  :)

 

First of all, thank you very much for this work, I haven't tested it entirely yet, but I am just starting ;D

 

It seems that I encounter this same problem...

 

 I am basically just doing this in my OnFormShow:

  UniGMap.InitializeMap;

EDIT: I don't know why but this error is not always fired..what am I missing ?  :wacko:

EDIT2: Firefox seems to have less problem to load google object !

 

Thank you again for your time !  -_-

 

Ps: Is your address still good ? (For your post card collection ^^)

 

 

Hello.

Please make sure that you have a uniGmap component on your MainForm or LoginForm if you use it.

(It doesn't need to be visible.)

Link to comment
Share on other sites

Hello Lema!

 

Thank you for you answer!

 

Yes, I did put a uniGMap on my mainForm, but still with that it happens sometime that I need to close session and re-open in order to properly load google object.

So I also add a uniGMap on my loginFrm: then I don't have the issue..  ^_^

Link to comment
Share on other sites

Hello Lema!

 

Thank you for you answer!

 

Yes, I did put a uniGMap on my mainForm, but still with that it happens sometime that I need to close session and re-open in order to properly load google object.

So I also add a uniGMap on my loginFrm: then I don't have the issue..  ^_^

When the component is being created, it adds the necessary paths in ServerModule.CustomFiles.

So, there must be an instance of uniGmap on your FIRST form.

I always suggest to place an invisible uniGmap on your MainForm or LoginForm.

Link to comment
Share on other sites

  • 2 weeks later...

Hello,

I have successfuly display a map and load a KML file (made with Google Earth) which contains some placemarks.

Now I have 2 questions:

1. How to display the name of the placemarks? Like we see in Google Earth

2. When we click on one of the placemarks, how do we know which placemark we have just clicked? I know that in the OnAjaxEvent event we can examine Params. But the difference between one placemark and another is only the lat & lng. Can we identify the placemark by its name? Or maybe some other identification?   

I am using Delphi 10.2.2 Starter + UniGUI Trial Edition 1.0.0 Build 1424 + uniGMap.v.1.4.8

Thank you!

Link to comment
Share on other sites

  • 2 weeks later...
  • 2 weeks later...

Have problems to make that work with mobile. Cant find why... Your mobile sample just work, i just add a unimgmap cmponent to main mobile form and dont.

 

I check the source of the web site and is clear is not adding the google map code.

 

Mine looks like 

 

<!DOCTYPE HTML>
<html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="charset=utf-8" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<link REL="SHORTCUT ICON" HREF="/m/cache/peopletrackerwebserver_exe/sM7rw1pc26101918E33/favicon.ico">
<title>PeopleTracker Web Client</title>


<link rel=stylesheet href="/m/touch-2.4.2-complete/resources/css/sencha-touch.css" />
<link rel=stylesheet href="/m/unim-1.0.0.1425/css/uni-ext.css" />
<script src="/m/touch-2.4.2-complete/sencha-touch-all.js"></script>
<script src="/m/uni-1.0.0.1425/ext-unicommon-min.js"></script>
<script src="/m/uni-1.0.0.1425/ext-sync-min.js"></script>
<script src="/m/unim-1.0.0.1425/locale/ext-lang-es.js"></script>




<script src="/m/uni-1.0.0.1425/jQuery/jquery-1.11.2.min.js"></script>
<script src="/m/unim-1.0.0.1425/touch-unigui-min.js"></script>


 

An the source of your sample like:

<!DOCTYPE HTML><html>
<head>
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta http-equiv="content-type" content="charset=utf-8" />
<meta http-equiv="cache-control" content="no-cache" />
<meta http-equiv="pragma" content="no-cache" />
<title>New Application</title>


<link rel=stylesheet href="/m/touch-2.4.2-complete/resources/css/sencha-touch.css" />
<link rel=stylesheet href="/m/unim-1.0.0.1425/css/uni-ext.css" />
<script src="/m/touch-2.4.2-complete/sencha-touch-all.js"></script>
<script src="/m/uni-1.0.0.1425/ext-unicommon-min.js"></script>
<script src="/m/uni-1.0.0.1425/ext-sync-min.js"></script>
<script src="/m/unim-1.0.0.1425/locale/ext-lang-es.js"></script>




<script src="/m/uni-1.0.0.1425/jQuery/jquery-1.11.2.min.js"></script>
<script src="/m/unim-1.0.0.1425/touch-unigui-min.js"></script>
<script src="http://maps.googleapis.com/maps/api/js?key=&libraries=geometry,places,visualization&sensor=false"></script>
<link rel=stylesheet href="/../files/uniGmap.css" />
<script src="/../files/markerwithlabel_packed.js"></script>
<script src="/../files/markerclusterer.js"></script>

Cant find WHY. The only details is mine app have both, mobile and desktop forms. Desktop works perfect, the only problem ios mobile.

 

Im testing calling with m at end 

 

http://localhost:8077/m

 

Hope somebod can help.

Link to comment
Share on other sites

  • 2 months later...

Hello,

 

I uploaded a new version which implements the API function getElevationForLocation.

 

 

2017-07-04  v1.4.6

Tested with uniGUI ver.1.0.0.1399

 

 

Online demo:

http://79.143.178.31/lema/uniGMapDemo.dll

 

 
Hello, Lema
 
I'm having problems with uniGUI version 1.10.0.1466
The problem is only displayed when published.
 
"Cannot read property 'getElevationForLocations' of undefined"
 
Could you help me, please?
 
Thank you!
 
Link to comment
Share on other sites

Hi everyone

 

This component worked fine in 10.2.2, but since I updated to 10.2.3 it gives me an error.

 

The map comes up briefly, but then it gives me an error as per attached image.

 

post-5914-0-18527400-1530740200_thumb.png

 

Thank you,

Donald

Link to comment
Share on other sites

Hello, Lema

 

When published, several problems occur in uniGUI version 1.10.0.1466

Here are some examples:

 

"Cannot read property 'getElevationForLocations' of undefined"

 

"Cannot read property 'clearMarkers' of undefined"

 


Could you help me, please?

 


Thank you!


Link to comment
Share on other sites

Hello everyone,

 

I just start using uniGMap component and tried the attached example, but it does not work as the provided demo

​I received the following error in the console 

++++++++++++++++++++++++++++++++++++++

Uncaught ReferenceError: GeolocationAPIForm is not defined

    at eval (eval at AjaxSuccess (ext-unicommon-min.js:9), <anonymous>:1:111) 

++++++++++++++++++++++++++++++++++++++

 

ext-unicommon-min.js exist in 'C:\Program Files (x86)\FMSoft\Framework\uniGUI\uni-1.10.0.1471' directory and the desktop demo works fine.

 

Am trying to show the Current location of the Client as soon as he opened the application, but without sucess.

 

Thanks.

 

 

example.zip

Link to comment
Share on other sites

 

Ola lema
 
Quando publicado, vários problemas ocorrem na versão uniGUI 1.10.0.1466
aqui estão alguns exemplos:
 
" Não é possível ler a propriedade 'getElevationForLocations' de undefined "
 
" Não é possível ler a propriedade 'clearMarkers' de indefinido "
 
Você poderia me ajudar por favor?
 
Obrigado!

 

 

problem solved! thank you
 
Link to comment
Share on other sites

 

Hello, Lema
 
When published, several problems occur in uniGUI version 1.10.0.1466
Here are some examples:
 
"Cannot read property 'getElevationForLocations' of undefined"
 
"Cannot read property 'clearMarkers' of undefined"
 
Could you help me, please?
 
Thank you!

 

 

problem solved! thank you
Link to comment
Share on other sites

Hi,

 

I'm having a problem.

I've been able to install the component without a problem.

When I create a small sample application, everything works just fine.

Now I'm trying to add it to an existing application and I get the following error when calling Geocoding:

 

Ajax error.

Google is not defined.

 

var geocoder = new google.maps.Geocoder(); geocoder.geocode({"address": "Esdoornstraat 5 Knokke"}, function(results, status) {   if (status == google.maps.GeocoderStatus.OK) {     ajaxRequest(O888, "Geocoder", ["lat="+results[0].geometry.location.lat(), "lng="+results[0].geometry.location.lng() ]); gm_O888.panTo( results[0].geometry.location );    } else {     ajaxRequest(O888, "Geocoder", ["Geocoder failed due to: " + status]);     }   } );

 

Any idea?

 

Thx,

Dominique

Link to comment
Share on other sites

hi

How did you solve it?

 

Hi

 

TUniGUIServerModule

 

add

 

UniServerModule.CustomFiles.Clear;

UniServerModule.CustomFiles.add('css/uniGmap.css');

UniServerModule.CustomFiles.add('js/markerclusterer.js');
UniServerModule.CustomFiles.add('js/markerwithlabel_packed.js');
  • Upvote 1
Link to comment
Share on other sites

Hi,

 

I'm having a problem.

I've been able to install the component without a problem.

When I create a small sample application, everything works just fine.

Now I'm trying to add it to an existing application and I get the following error when calling Geocoding:

 

Ajax error.

Google is not defined.

 

var geocoder = new google.maps.Geocoder(); geocoder.geocode({"address": "Esdoornstraat 5 Knokke"}, function(results, status) {   if (status == google.maps.GeocoderStatus.OK) {     ajaxRequest(O888, "Geocoder", ["lat="+results[0].geometry.location.lat(), "lng="+results[0].geometry.location.lng() ]); gm_O888.panTo( results[0].geometry.location );    } else {     ajaxRequest(O888, "Geocoder", ["Geocoder failed due to: " + status]);     }   } );

 

Any idea?

 

Thx,

Dominique

 

Hi Dominique,
 
In case you are interested you may be looking at my components:
 

post-545-0-73728300-1531915646_thumb.png

post-545-0-83705400-1531915656_thumb.png

post-545-0-18242600-1531915666_thumb.png

post-545-0-85530700-1531915683_thumb.png

Link to comment
Share on other sites

 

Hi

 

TUniGUIServerModule

 

add

 

UniServerModule.CustomFiles.Clear;

UniServerModule.CustomFiles.add('css/uniGmap.css');

UniServerModule.CustomFiles.add('js/markerclusterer.js');
UniServerModule.CustomFiles.add('js/markerwithlabel_packed.js');

 

Thank you

Link to comment
Share on other sites

Please sign in to comment

You will be able to leave a comment after signing in



Sign In Now
×
×
  • Create New...