Configure Javascript in android for showing marker in geoserver - javascript

I am able to show Geoserver map using webview (In android) and want to show marker on geoserver map in my android application.
Please suggest how to achieve this.
Hope to hear from you soon.
Regards,
Parmanand Soni

Related

How to render javascript markers on google maps in WebView?

I am trying to render javascript markers on google maps in WebView, but markers are not showing in WebView.
I have set
binding.webView.setWebViewClient(webViewHelper);
binding.webView.setWebChromeClient(new WebChromeClient());
binding.webView.getSettings().setJavaScriptEnabled(true);
binding.webView.getSettings().setDomStorageEnabled(true);
binding.webView.getSettings().setLoadWithOverviewMode(true);
binding.webView.getSettings().setUseWideViewPort(true);
binding.webView.getSettings().setBuiltInZoomControls(true);
binding.webView.getSettings().setDisplayZoomControls(false);
binding.webView.getSettings().setSupportZoom(true);
binding.webView.getSettings().setDefaultTextEncodingName("utf-8");
binding.webView.getSettings().setLoadsImagesAutomatically(true);
in WebView Settings. Map is rendered but still not showing the markers. Markers are showing outside of WebView. Does anyone have any solution on how to render javascript markers on WebView?
After going through the developer documentation adding webView.getSettings().setMixedContentMode (MIXED_CONTENT_ALWAYS_ALLOW);
fixed the issue.

How to show select-app dialog through Javascript?

I'm working with an android wrapped app (using web viewer), and I would like to ask the user which app wants to use when pressing in address from my app.
Example pop-up in android (Spanish): https://puu.sh/EEXBK/388b01494d.png
I have tried using the google API launcher which is: https://www.google.com/maps/dir/?api=1&origin=xxx&destination=xxx&travelmode=driving
But this opens directly maps, without asking if you want to use Waze or not.
It is possible with Javascript?
My targets are Maps and Waze.
Any suggestions?
Thanks.
check this document for opening waze and for google map check this
you can create url for each one
example waze:
https://www.waze.com/ul?ll=40.75889500%2C-73.98513100&navigate=yes&zoom=17
example google maps:
https://www.google.com/maps/#?api=1&map_action=map&center=-33.712206,150.311941&zoom=12&basemap=terrain
You can use these URLs:
appleURL = "http://maps.apple.com/?daddr=\(latitude),\(longitude)"
googleURL = "comgooglemaps://?daddr=\(latitude),\(longitude)&directionsmode=driving"
wazeURL = "waze://?ll=\(latitude),\(longitude)&navigate=false"
For more see this link

google map plugin on wordpress page not showing

I have a website made with Wordpress that should show a Google Map on three sub-pages. The problem is the map only shows if I open the page and then refresh it.
Note: I don't have a cache plugin installed.
Live site
Google Maps plugin
the problem is solved now.
it was an issue with the theme. i deactivated the ajax of the theme and the maps are now working.

Google Maps Javascript API Doesn't Respond to Touch Events in iOS 10

I run a website with a number of custom Google Maps built in (showing various locations on a map after a search or generating directions to/from a location). I use Google Maps Javascript API for this. My users have started reporting that on iOS 10, these maps no longer respond to touch events -- they cannot pinch-to-zoom nor can they click on the "pins" on the map to open the location info balloons.
I've been searching all over for others who have had this issue to no avail. I found one StackOverflow question here (http://webcache.googleusercontent.com/search?q=cache:DaiSdOgD0U4J:stackoverflow.com/questions/39401974/google-maps-javascript-doesnt-pan-or-zoom-in-ios-10+&cd=3&hl=en&ct=clnk&gl=us), but it was downvoted, then deleted. (Why?) A fresh search today still shows that page, but it leads to a 404, making a search even more frustrating.
Has anyone else experienced this? Is this a bug within the Google Maps API? I certainly can't find anything about that on their Developer website. Am I possibly doing something very wrong to lead to this? The code has worked for years and hasn't been modified in a few months now, so nothing changed on our end.
We do use an API key in our requests
I've tried switching from the
current release version (3.25) to the current experimental version
(3.26) with no changes in functionality.
Users report this happens in at least both Safari and Chrome on iOS 10
Just hoping someone can provide any insight at all on the issue.
Ok here is how I did to fix this issue.
As a reminder i'm using AngularJS via the Ionic framework.
I was calling the map this way in my index.html :
<script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=PUT_YOUR_GOOGLE_API_KEY_HERE&signed_in=true"></script>
It seams like signed_in feature of google map is adding a layer on the map that is not letting the map getting the X,Y of your screen touch position.
I just replaced by false to disable the signed_in feature and its working like a charm
<script src="https://maps.googleapis.com/maps/api/js?libraries=places&key=PUT_YOUR_GOOGLE_API_KEY_HERE&signed_in=false"></script>

Cordova problems with google map

I'm developing an app whit phonegap (cordova). This app includes a google map with some markers.
The app also has more pages as a list of comerces…
The map shows correctly, but when I change the page, and back to the map page, sometimes the map is displaced and the info windows not open correctly.
Is there any way to put a map and it appears correctly when changing pages?
And I have also seen that the map consuming a lot internet data.
Could someone make me a suggestion?
I hope someone can help me!!
Thanks, and excuse me for my bad english.
I had similar problems with google maps and cordova. I was using jquery-mobile and sometimes if you switch between pages the maps wasn't loaded properly. You can check out different page events and try to "resize" the maps. I was also playing with different version of cordova and jquery-mobile. This could help as well.
$(document).on("pagebeforeshow","#pagetwo",function(){
google.maps.event.trigger(map, 'resize');
});
best
M

Categories

Resources