Jump to content

UnimMap blank on mobile and marker click info [SOLVED]


devya

Recommended Posts

Dear all,

I am developing inhouse system for my office, using UniguiMap for Touch.

I realize sometime the map is become blank, not showing any map at all, and we have dificulties for the marker.

Can i have advice for this unimmap component :

1. Is unimmap need to initialize for the first time loading , can show me the best pratice ?

2. i show in the demo the event for UniMap1MarkerClick are empty, can show my the best way to get the information from the marker which user click ?

Thanks in advance for your advise.

Best regards,


Devy

Link to comment
Share on other sites

Good morning,

I put unimmap in a form but did not get any results. I think it would also be important that they document the minimum requirements for this component to work. In some comment it was reported that SSL was required, but I do not know if it requires a google key to see the maps on the cell phone, again it would be important to document / list the mandatory requirements to use this component. Thank you

Link to comment
Share on other sites

2 hours ago, Hayri ASLAN said:

Hi,

To reproduce the issue can you please create a simple test case?

Dear Hayri

I am attach the sample .

First loading in mobile browser ok, but after i exit the apps from the browser and start again, the map become blank.

 

Regards

 

Devy

 

senttoforum.zip

Link to comment
Share on other sites

2 hours ago, asapltda said:

Good morning,

I put unimmap in a form but did not get any results. I think it would also be important that they document the minimum requirements for this component to work. In some comment it was reported that SSL was required, but I do not know if it requires a google key to see the maps on the cell phone, again it would be important to document / list the mandatory requirements to use this component. Thank you

You need to enable the SSL from the unigui server, and access it with https:// .

And absolutetly you need to have google map api key to access and working the map

 

Link to comment
Share on other sites

On 4/23/2020 at 11:38 PM, devya said:

Hi @Hayri ASLAN,

Any updates ?

 

Hi

Can you please add below code to unimap.pas line 629

  if IsMobile then
    JSCallGlobal(FMapJSName + '.on', ['layeradd', JSFunction('','if (Ext.isDefined('+FMapJSName+'.invalidateSize)){setTimeout(function(){'+FMapJSName+'.invalidateSize();},1000); } ')]);

 

Link to comment
Share on other sites

13 hours ago, Hayri ASLAN said:

Hi

Can you please add below code to unimap.pas line 629


  if IsMobile then
    JSCallGlobal(FMapJSName + '.on', ['layeradd', JSFunction('','if (Ext.isDefined('+FMapJSName+'.invalidateSize)){setTimeout(function(){'+FMapJSName+'.invalidateSize();},1000); } ')]);

 

Hi Hayri,

i put in your code in Unimap.pas, but the result become worst, the map blank all the time.

then i remove back your line, the map works one time.

I notice, when the map become blank, i rotate my mobile scree to landscape then the map can show the map. but after i restart the map it's blank again, so i need to rotate again the screen to view the map.

But this error happen only when i use MapLayer = mlGoogle, not for the MapLayer=mlOSM

 

Regards

Devy

 

 

Link to comment
Share on other sites

  • 2 weeks later...
On 4/27/2020 at 6:52 AM, Hayri ASLAN said:

Hi

Can you please add below code to unimap.pas line 629


  if IsMobile then
    JSCallGlobal(FMapJSName + '.on', ['layeradd', JSFunction('','if (Ext.isDefined('+FMapJSName+'.invalidateSize)){setTimeout(function(){'+FMapJSName+'.invalidateSize();},1000); } ')]);

 

Hi @Hayri ASLAN

 

Any news for my problem ?

Link to comment
Share on other sites

On 5/7/2020 at 9:38 AM, Hayri ASLAN said:

Hi

with this code, I can't get the problem.

Are you testing with which device?

Hi @Hayri ASLAN,

I am testing with Samsung Galaxy Note 10+, Unigui 1.90.0.1531.

I am also already use HTTPS for the server.

Link to comment
Share on other sites

Today I started using TUnimMap instead of TUnimGMap in a project and having similar problems like you (map becomes invisible) only rotating device causes the map to refresh and display. I've been watching this thread.

 

Edited by Mehmet Emin
Link to comment
Share on other sites

On 4/23/2020 at 12:34 PM, devya said:

2. i show in the demo the event for UniMap1MarkerClick are empty, can show my the best way to get the information from the marker which user click ?

Forum removes my brackets from source code so I am attaching the image :excl:


 

marker access.png

Link to comment
Share on other sites

2 hours ago, Mehmet Emin said:

Today I started using TUnimMap instead of TUnimGMap in a project and having similar problems like you (map becomes invisible) only rotating device causes the map to refresh and display. I've been watching this thread.

 

Hi @Mehmet Emin,

I hope Hayri can find the solution for us. Cos now i use both unimmap + unimGmap to cover each other ..

Link to comment
Share on other sites

I've created an empty mobile project.

At first access page loads fine (map displayed)

After the second refresh (even empty cache and hard reload) map disappears (grey color with layer and zoom indicators visible)

After this point map is visible only if do a rotate or resize.

Please uniGUI team I have a project delivery on Monday and I still ask customer to rotate their phones to see the map for testing.

Link to comment
Share on other sites

1 hour ago, Mehmet Emin said:

I've created an empty mobile project.

At first access page loads fine (map displayed)

After the second refresh (even empty cache and hard reload) map disappears (grey color with layer and zoom indicators visible)

After this point map is visible only if do a rotate or resize.

Please uniGUI team I have a project delivery on Monday and I still ask customer to rotate their phones to see the map for testing.

I'm working on this issue

Link to comment
Share on other sites

1 minute ago, Mehmet Emin said:

Hayri

The code you sent solves the issue I reported; BUT now my map markers are not visible. And I need to show markers on the map

Thanks

Are you creating your markers on create?

Please move them to onupdatehtml of unimmap

Link to comment
Share on other sites

This way it is working. And it seems to solved my problems.

I will post to this thread if I find any other problem.

Thank you.

 

procedure TfrmMainm.MapAjaxEvent(Sender: TComponent; EventName: string;
  Params: TUniStrings);
begin
  if EventName = 'afterupdatehtml' then
  begin
    CreateMapMarkers;
  end;
end;
 

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...