jahlxx Posted April 7, 2016 Share Posted April 7, 2016 ok thanks. it works. but only when I show the form that contains the map from the mainform. not from any other form. Is strange. Any idea? Quote Link to comment Share on other sites More sharing options...
albertovesx Posted April 7, 2016 Share Posted April 7, 2016 ok thanks. it works. but only when I show the form that contains the map from the mainform. not from any other form. Is strange. Any idea? Add in the main form a unigmap component and set visible to false. Then you can add and use unigmap and any other form. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 7, 2016 Share Posted April 7, 2016 I've tried, but only show map when calling from the mainform Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 8, 2016 Share Posted April 8, 2016 the problem is solved. there was some code in the clientevent of a unitreevieww, in on exppand. I've removed that code, and now it works. Now I only have to know how to do markers and polygons, and this will be fine for me. Thanks to everyone. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 8, 2016 Share Posted April 8, 2016 after initializemap, must I wait any amount of time to create markers and / or polygons? if I do UniGMap1.InitializeMap; and inmediately add markers, the app. raise an error. I have a button to create a mark after show a map, but I can't do it at once. I dont' know what is the correcto order to make a map with marks. In the samples, all the marks ar created with a button click, not in the formshow. some help please. thanks. Quote Link to comment Share on other sites More sharing options...
lema Posted April 9, 2016 Author Share Posted April 9, 2016 after initializemap, must I wait any amount of time to create markers and / or polygons? if I do UniGMap1.InitializeMap; and inmediately add markers, the app. raise an error. I have a button to create a mark after show a map, but I can't do it at once. I dont' know what is the correcto order to make a map with marks. In the samples, all the marks ar created with a button click, not in the formshow. some help please. thanks. Web application works asynchronous. As workaround you can use a timer with 100-200ms interval. procedure TForm1.FormShow(Sender: TObject); begin UniGMap1.InitializeMap; UniTimer1.Enabled := True; end; procedure TForm1.UniTimer1Timer(Sender: TObject); begin UniTimer1.Enabled := False; //Create Markers end; Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 9, 2016 Share Posted April 9, 2016 ok. thanks. it works.it's very important for me. good job. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 9, 2016 Share Posted April 9, 2016 I'm testing, navigating from a cell phone and a tablet. the form map, shows blank. why? thanks. Enviado desde mi Galaxy Nexus mediante Tapatalk Quote Link to comment Share on other sites More sharing options...
lema Posted April 9, 2016 Author Share Posted April 9, 2016 I'm testing, navigating from a cell phone and a tablet. the form map, shows blank. why? thanks. Enviado desde mi Galaxy Nexus mediante Tapatalk Did you try the demo app ? http://79.143.178.31/lema/uniGMapDemo.dll 1 Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 9, 2016 Share Posted April 9, 2016 yes, it works. perhaps, I forgot something in my test project? Enviado desde mi Galaxy Nexus mediante Tapatalk Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 9, 2016 Share Posted April 9, 2016 I've removed timer added to solve a prior problem, and now it seems that is working. But in my test, the map takes many time to be showed, too mauch more than your demo. Quote Link to comment Share on other sites More sharing options...
jahlxx Posted April 9, 2016 Share Posted April 9, 2016 but it works. thanks. I'll give more time to the timer, and test again. Enviado desde mi Galaxy Nexus mediante Tapatalk Quote Link to comment Share on other sites More sharing options...
asapltda Posted May 5, 2016 Share Posted May 5, 2016 Put a market on the map, using unigui phone Hello, Mr. Lema, as I can place a marker , the geolocalizacion found .? Tks Quote Link to comment Share on other sites More sharing options...
lema Posted May 6, 2016 Author Share Posted May 6, 2016 Put a market on the map, using unigui phone Hello, Mr. Lema, as I can place a marker , the geolocalizacion found .? Tks Hello, I am not sure that I understood your question. If you want to place a marker after the geolocation.getCurrentPosition call, you can see the demo's GeolocationAPIFM unit. Quote Link to comment Share on other sites More sharing options...
mierlp Posted May 18, 2016 Share Posted May 18, 2016 Hi, Is there a version for XE-7 and how to install..? Regards Peter Quote Link to comment Share on other sites More sharing options...
lema Posted May 18, 2016 Author Share Posted May 18, 2016 Hi, Is there a version for XE-7 and how to install..? Regards Peter Hello, try the following UniGMapDXE7.zip Quote Link to comment Share on other sites More sharing options...
mierlp Posted May 19, 2016 Share Posted May 19, 2016 Hi Lema, THanks...that's the correct file. I just want to use some geocoding and looked at the example...but missing something? So i created a form which contains the UniGmap. The OnShow events contains : UniGmap.Initialize; Put a editbox on the form for entering the addres and a button to do the search with this code : UniGMap1.Geocoding(UniEdit_Address.Text) I got this Ajax error _rsov_(O4BF,22);var geocoder = new google.maps.Geocoder(); geocoder.geocode({"address": "standaardmolen 86 weert"}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { ajaxRequest(O50B, "Geocoder", ["lat="+results[0].geometry.location.lat(), "lng="+results[0].geometry.location.lng() ]); } else { ajaxRequest(O50B, "Geocoder", ["Geocoder failed due to: " + status]); } } ); Quote Link to comment Share on other sites More sharing options...
lema Posted May 20, 2016 Author Share Posted May 20, 2016 Hi Lema, THanks...that's the correct file. I just want to use some geocoding and looked at the example...but missing something? So i created a form which contains the UniGmap. The OnShow events contains : UniGmap.Initialize; Put a editbox on the form for entering the addres and a button to do the search with this code : UniGMap1.Geocoding(UniEdit_Address.Text) I got this Ajax error _rsov_(O4BF,22);var geocoder = new google.maps.Geocoder(); geocoder.geocode({"address": "standaardmolen 86 weert"}, function(results, status) { if (status == google.maps.GeocoderStatus.OK) { ajaxRequest(O50B, "Geocoder", ["lat="+results[0].geometry.location.lat(), "lng="+results[0].geometry.location.lng() ]); } else { ajaxRequest(O50B, "Geocoder", ["Geocoder failed due to: " + status]); } } ); Hi Peter. Can you provide a test app? Quote Link to comment Share on other sites More sharing options...
mierlp Posted May 20, 2016 Share Posted May 20, 2016 Hi Lema, I just created a fresh test project (see attachment) and now it's working. I got the error in a existing big project where i added the GMap functionality....so i have to see what's differenbce between the test project and the existing project. BUT...if have 1 question...is it possible to ad a marker / infowindow based on the given address or do you have to reverseGeocoding first before to adding a marker / infowindows Regards PEter Gmap.zip Quote Link to comment Share on other sites More sharing options...
lema Posted May 20, 2016 Author Share Posted May 20, 2016 Hi Lema, I just created a fresh test project (see attachment) and now it's working. I got the error in a existing big project where i added the GMap functionality....so i have to see what's differenbce between the test project and the existing project. BUT...if have 1 question...is it possible to ad a marker / infowindow based on the given address or do you have to reverseGeocoding first before to adding a marker / infowindows Regards PEter Hello. At first, make sure that you have copied the js libraries under the directory /files (see the demo structure) Second, you will need an entry pointing to google api in your servermodule.CustomFiles. (http://maps.googleapis.com/maps/api/js?........) You can drop a gmap component on your main form and it will do the job for you. (You can set its visibility to false) And yes, you have to call at first the geocode procedure in order to get Latitude and Longitude and then use them in AddMarker. Quote Link to comment Share on other sites More sharing options...
lema Posted May 20, 2016 Author Share Posted May 20, 2016 Now I see that marker clusterer icons are gone. It's broken even on the main site's example pages https://googlemaps.github.io/js-marker-clusterer/docs/examples.html Probably Google removed the repository... There is a discussion about it on github https://github.com/googlemaps/js-marker-clusterer/issues I think we have to host the icons locally and change accordingly the library. icons.zip 1 Quote Link to comment Share on other sites More sharing options...
sirac Posted August 12, 2016 Share Posted August 12, 2016 Excuse me if i reply to this post but i can't made a new post. I have a problem with unigmap component v 1.3.4 on delphi xe2. The component work correct on localhost but don't work on a web call for exemple work on https:\\localhost:8077 and not work on http://siracsrl2012n2.dyndns.org:8077. I try to made a new google api key but i don't solve the problem. Someone can help me. Tnx. Quote Link to comment Share on other sites More sharing options...
lema Posted August 12, 2016 Author Share Posted August 12, 2016 Excuse me if i reply to this post but i can't made a new post. I have a problem with unigmap component v 1.3.4 on delphi xe2. The component work correct on localhost but don't work on a web call for exemple work on https:\\localhost:8077 and not work on http://siracsrl2012n2.dyndns.org:8077. I try to made a new google api key but i don't solve the problem. Someone can help me. Tnx. Hello. First of all, you must use the latest version of component (1.4.1). To bypass the Google API Key, just build with the {$DEBUG} directive ON. Quote Link to comment Share on other sites More sharing options...
epos4u Posted August 13, 2016 Share Posted August 13, 2016 Hello. First of all, you must use the latest version of component (1.4.1). Hi Lema i can only see in the first post ver 1.4.0 Quote Link to comment Share on other sites More sharing options...
lema Posted August 13, 2016 Author Share Posted August 13, 2016 Hello, I uploaded the missing version. 2016-05-26 v1.4.1 --Fixed Marker Cluster library image path Please note that there are changes in included files. 1. files\markerclusterer_compiled.js replaced by files\markerclusterer.js 2. directory \images added with m*.png files (its a requirement for the new marker clusterer library) Tested with 0.99.95.1298 Online demo: http://79.143.178.31/lema/uniGMapDemo.dll 1 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.