Questions about MoveObject, SetObjectBounds and neoMap - Forum

Forum Navigation
You need to log in to create posts and topics.

Questions about MoveObject, SetObjectBounds and neoMap

Hi, Happy new year to everybody !

I have a page with a container menu on the left and a container map on the right. When I hide my menu, I move and resize the map to full screen.

If I use MoveObject "cCarte" 0 0, the map does not move (0,0 are not allowed ?), also if I use SetObjectBounds "cCarte" 0 0 1920 927.

When I use SetObjectBounds "cCarte" 1 1 1919 926, the height cannot be set to null, neither previous height -1 to avoid having scrollbars ?

After moving and resizing my map the card does not cover the entire width of the container and I am not able to see svgIcon2 above the map ?

If I recall the menu and hide again the map is not resized ?

When I click on the plus or minus of zoom, how can I get the value of the zoom ?

See my example

Uploaded files:
  • You need to login to have access to uploads.

Hi @phil78 Happy new year to you too!

Too many questions in a single post...

If I use MoveObject "cCarte" 0 0, the map does not move (0,0 are not allowed ?), also if I use SetObjectBounds "cCarte" 0 0 1920 927.

It seems like a bug to me. I will take a look. Use this approach instead:

CreateEmptyObject [mycss]
SetVar [mycss.top] "0px"
SetVar [mycss.left] "0px"
SetVar [mycss.width] "300px"
SetVar [mycss.height] "700px"
SetObjectCSS "cCarte" [mycss]

When I use SetObjectBounds "cCarte" 1 1 1919 926, the height cannot be set to null, neither previous height -1 to avoid having scrollbars ?

Additionally to the previous solution, to avoid scrollbars just be sure to set the cCarte Style properties avorflow-x and overflow-y to hidden value.
Note that if you resize cCarte the map will not cover the whole surface.

Please take a look to the attached sample app. It shows a similar lateral menu with animation.

Regards.

Uploaded files:
  • You need to login to have access to uploads.

Thanks @luishp It is ok and perfect for lateral menu. But I always have the problem to see the svgIcon2 or pushbutton to recall the menu. If I initialize a map on your example, I see the button but not the map ???

After resize the map does not cover the whole surface, but if remove and initialize again it will do but except the first time ???

And you did not answser to my last question "When I click on the plus or minus of zoom, how can I get the value of the zoom ?"

But I always have the problem to see the svgIcon2 or pushbutton to recall the menu

That's probably because one or more map elements have a greater z-index than your button, hidding it.
Create a CSS class with a high z-index and apply it to your button.

.highzindex{
  z-index:1000;
}

After resize the map does not cover the whole surface, but if remove and initialize again it will do but except the first time ???

No idea.

how can I get the value of the zoom ?

neoMapGetZoom

Regards.

 

thanks again @luishp Ok now I see the button. To whom corresponds z-index ?

I use neoMapGetZoom but I do not get the value when I click on the ZoomControl ?

I use neoMapGetZoom but I do not get the value when I click on the ZoomControl ?

You can not add commands to default zoom buttons. Hide them and use your own zoom buttons instead.

To whom corresponds z-index

I don't understand this question. z-index is a CSS property.

OK @luishp, I have undertood about z-index kind of perperty. but now I do not see anymore the tooltip ???

Last question, when I use neoMapMarkerEvent with "contextmenu" how it works ?

but now I do not see anymore the tooltip ???

Please understand I can't debug your project.

when I use neoMapMarkerEvent with "contextmenu" how it works ?

Only concise, isolated questions please.

Best regards.