I have a Basic4PPC program that displays Bing (or Google) static maps in a WebBrowser, simply with one statement: WEB1.Navigate(URLStr).
Now, I try to do the same in Basic4Android using a WebView view, as follows:
In the designer I added WebView1, 0,0,480,480
Under Globals: Dim WebView1 as WebView
Under Activity_Create: WebView1.Initialize("WebView1")
In a sub GetMap:WebView1.LoadUrl(URLStr)
Finally in Sub WebView1_PageFinished(WEBStr)
Freeze(False)
MapLoaded=True
CBNavigate.RequestFocus
End Sub
I get the impression data some data traffic occurs; but no map is shown.
I searched the WEB for a simple demo of the use of WebView but only find a lot of Java stuff, which I don't understand.
I recommend you to use 'basic4android' tag for Basic4android related questions. See this link for an example of using WebView with google maps.
Related
I'm trying to do a PDF Reader which have the following features:
bookmarks
zooming
highlight //annotation or just changing the background of the rect
search
what I'm using is vfr/Reader :
https://github.com/vfr/Reader
it have the zooming function and bookmarks
and I want to make it like LazyPDf : https://github.com/lazyprogram/LazyPDFKit
which have annotation function
or make it like github.com/Ink/ThatPDF
which have less annotation functions than lazypdf
and add the search from
github.com/KurtCode/PDFKitten
the problem is that i have been working on it for like a month and I didn't make any progress and I don't know where to start or how to merge those applications together , even though all of them uses CGPDF.
please help me to find a way to make my app or let me know if there is a better free library ,and if i need to learn anything just drop a link in a comment.
Thank you !!
You can use below link for pdf reader.
you can easly use the book mark,zooming,saved pdf,email,print pdf
https://github.com/vfr/Reader
You can use iOS PDFKit:
This reponse will help you
We had a Vaadin 7 UI page with multiple Layouts, Panels, and Chart (the Browser will come with ScrollBar as height is big). When we try to print using JavaScript in Vaadin code or using Ctrl+P of browser, it prints only One page in Firefox 32.0.3; prints multiple pages with only data for First Page in IE 8.
We tried with specifying undefined size for all components in UI page
(as mentioned in https://vaadin.com/forum#!/thread/3869543/7861633)
We also tried with some CSS changes for print (as mentioned in https://vaadin.com/forum/#!/thread/529738/539201)
Both above cases didnot solved our problem. As we can understand from documentation that Vaadin scrolling uses a DOM structure, it was unusual to know such a tool does not provide proper Print option.
To brief our objective, we are looking at Reporting option in Vaadin for some data analysis. We saw some options (using JasperReport etc.) mentioned in StackOverflow, however will not be able to implement them as we need to deploy this application to Google App Engine (GAE) which has unsupported functions such as FileOutputStream etc.
To conclude, these are our issues -
How to resolve multiple page print issue in Vaadin 7?
If we are not able to solve first issue, What is the best Reporting library (for PDF or PNG or HTML or Print) that is supported by both Vaadin 7 and GAE?
Any guidelines or suggestions to direct us would be appreciated.
Printing HTML pages is random at best.
Every browser has it's own rules for display and page breaks. We always use pdf for things to print.
iReport / Jasperreports is the thing we use most of the time
You can try this workaround:
private void setSizeUndefined2Print()
{
com.vaadin.ui.JavaScript.getCurrent().execute("document.body.style.overflow = \"auto\";" +
"document.body.style.height = \"auto\"");
UI.getCurrent().setSizeUndefined();
this.setSizeUndefined();
}
If for some cases you need to switch back to "defined" size, next method can be used:
private void setSizeFull2Print()
{
com.vaadin.ui.JavaScript.getCurrent().execute("document.body.style.overflow = \"\";" +
"document.body.style.height = \"\"");
UI.getCurrent().setSizeFull();
this.setSizeFull();
}
I'm trying to set the Visitor ID in Adobe Analytics through DTM.
Above the s_code I have:
var visitor = new Visitor("xxxx")
visitor.trackingServer = "xxx.xx.xx.omtrdc.net"
I've created a data element where the legacy code used to call the
Visitor.getInstance("xxxx");
and set the Visitor ID to %Visitor ID%
That's not working however, and my visitor ID is always just set to %Visitor ID% and obviously not reading any values. I'd really appreciate any input that someone can give me.
Thanks,
Mike
The Visitor ID pops s.visitorID and is in general related to visitor id, but is not the same as s.visitor which is what gets popped for the VisitorAPI integration. DTM does not currently have a built-in field for the s.visitor variable, so you will have to set it yourself within the config, either in the Library Management code editor (assuming you are opting to c/p the core lib and not the "Managed by Adobe" option) or else in the Custom Page Code section.
Since you are popping it in a data layer first, you can reference the data layer like this:
s.visitor = _satellite.getVar('Visitor ID');
NOTE: A separate potential issue you may have is with whether or not the Visitor object is available for your data element. Since data elements are the first thing to be evaluated by DTM, you will need to ensure that the VisitorAPI.js library is output before your top page DTM script include.
If this is a problem for you, or if you are wanting to host VisitorAPI.js within DTM, then you may need to adjust where you are popping that stuff. For example, place the VisitorAPI core code above the custom code as the first stuff within the data element, before:
var visitor = new Visitor("xxxx") visitor.trackingServer = "xxx.xx.xx.omtrdc.net
Or, don't use the data element at all. Instead, put the VisitorAPI code within the Adobe Analytics custom code or core lib section and pop all that stuff (aboove the s.visitor assignment). Or a number of other methods; point is, VisitorAPI stuff must be loaded before the data element can make use of it, same as it must be loaded before Adobe Analytics can make use of it.
So DTM is changing pretty fast and furious right now. They have a "Marketing Cloud Service ID" that works well. Before I used that, however, I did find a way to fix the code. Crayon Violent was right, as usual, that the problem was that the script wasn't available yet. I fixed this by putting the following code in between the VisitorAPI.js and the AppMeasurement stuff in the DTM managed library.
var aA = new AppMeasurement();
aA.visitorNamespace="companyname";
aA.visitor = Visitor.getInstance("companyname");
In addition, there were also some issues using my localhost for testing while trying to see if I had this correct or not. If you are having issues and think you have it correct, it may be worthwhile to elevate it to a different environment.
The scenario:
I have an ApEx page which pulls a record from a table. The record contains an id, the name of the chart (actually a filename) and the code for an image map as an NVARCHAR2 column called image_map.
When I render the page I have an embedded HTML region which pulls the image in using the #WORKSPACE_IMAGES#&P19_IMAGE. substitution as the src for the image.
Each chart has hot spots (defined in the image_map html markup) which point to other charts on the same ApEx page. I need to embed the:
Application ID (like &APP_ID.)
Session (like &APP_SESSION.)
My problem:
When I try to load the &APP_ID as part of the source into the database it pre-parses it and plugs in the value for the ApEx development app (e.g. 4500) instead of the actual target application (118).
Any help would be greatly appreciated.
Not a lot of feedback - guess I'm doing something atypical?
In case someone else is trying to do this, the workaround I ended up using was to have a javascript run and replace some custom replacement flags in the urls. The script is embedded in the template of the page and assigns the APEX magic fields to local variables, e.g.:
var my_app_id = '&APP_ID';
Not pretty, but it works...
Ok - I think I've left this open long enough... In the event that anyone else is trying to (mis)use apex in a similar way, it seems like the "apex way" is to use dynamic actions (which seem stable from 4.1.x) and then you can do your dynamic replace from there rather than embedding js in the page(s) themselves.
This seems to be the most maintainable, so I'll mark this as the answer - but if someone else has a better idea, I'm open to education!
I found it difficult to set a dynamic URL on a link to another page - directly - attempting to include the full URL as an individual link target doesn't work, at least in my simplistic world, I'm not an expert (as AJ said: any wisdom appreciated).
Instead, I set individual components of the url via the link, and a 'Before Header' PL/SQL process on the targeted page to combine the elements into a full url and assign it to the full url page-item:
APEX_UTIL.set_session_state(
'PG_FULL_URL',
'http...'||
v('PG_URL_COMPONENT1')||
v('PG_URL_COMPONENT2')||
'..etc..'
);
...where PG_FULL_URL is an item of Type 'Display Image', 'Based On' 'Image URL stored in Page Item Value'.
This is Apex 5.1 btw, I don't know if some of these options are new in this release.
In a desktop Qt application, I have some GPS coordinates that I'd like to show on a map. My plan is to construct an URL with the coordinates and let a web browser and Google maps or a similar service do the heavy lifting.
After reading some apparently reverse-engineered documentation at
mapki.com slash wiki slash Google_Map_Parameters
I can make it work for a single point, but what's the URL syntax for multiple points?
My best shot so far is to build a string such as this:
http://maps.google.com/?ie=UTF8&q=My+First+Point#59.591,17.82&q=My+Second+Point#59.592,17.82
but that will only show "My Second Point". Is there a better description of the syntax somewhere?
Replacing q= with markers= did not work and the "static map" suggestion below only complained about an incorrect API key.
for google maps static there is this URL:
http://maps.google.com/maps/api/staticmap?center=Brooklyn+Bridge,New+York,NY&zoom=14&size=512x512&maptype=roadmap
&markers=color:blue|label:S|40.702147,-74.015794&markers=color:green|label:G|40.711614,-74.012318
&markers=color:red|label:C|40.718217,-73.998284&sensor=false&key=MAPS_API_KEY
Detailed version:
http://maps.google.com/maps/api/staticmap?
center=Brooklyn+Bridge,New+York,NY
&zoom=14
&size=512x512
&maptype=roadmap
&markers=color:blue|label:S|40.702147,-74.015794
&markers=color:green|label:G|40.711614,-74.012318
&markers=color:red|label:C|40.718217,-73.998284
&sensor=false
&key=MAPS_API_KEY
i am not sure if this syntax is also good for standard maps
http://staticmapmaker.com/ - very nice web tool for generating static map urls.
List of currently supported map services:
- Google
- Bing
- Yandex
- HERE
- Mapbox
- MapQuest
- CartoDB
p.s. I know this is an old question, but many still google for it.
Throwing parameters at maps.google.com only gets you one point.
As dusoft says, you could use Google Static maps.
Or, if you require dynamic maps, you could write your own public web page that uses Google Maps API and accepts a long list of parameters. Use your own web page in exactly the same way that you were intending to use maps.google.com web page, except that you get to design what you want the parameters to look like.
Perhaps something like this.
Several parameters (such as the markers and path parameters) take multiple locations. In those cases, the locations are separated by the pipe (|) character.
https://maps.googleapis.com/maps/api/staticmap?center=boca+raton,+fl+|+deerfied,+FL&zoom=12&scale=false&size=600x300&maptype=roadmap&sensor=false&key=API_KEY&format=png&visual_refresh=true&markers=size:mid%7Ccolor:red%7Cboca+raton,+fl+|+deerfied,+FL" alt="Google Map of boca raton, fl | deerfied, FL
I know that you specifically asked for Google Maps, however I came up with a solution using Bing Maps:
https://bing.com/maps/default.aspx?sp=point.48.858303_2.3499404_Eiffel%20Tower~point.48.8530067_2.3499404_Notre-Dame%20Cathedral~point.48.8605088_2.3376727_Louvre link
The sp parameter can define a list of points, polylines, polygons and addresses. Multiple objects are separated by ~.
The syntax for point is:
point.latitude_longitude_titleString_notesString_linkURL_photoURL
titleString is displayed in the map and notesString only when clicking on a point.
A Link with you coordinates would look like:
https://bing.com/maps/default.aspx?sp=point.59.591_17.82_P1~point.59.592_17.82_P2 link
I did some tests on how many of these points can be in a URL by generating a really long URL in the form of https://www.bing.com/maps?sp=point.10.000000_10.000000_0~point.10.000000_10.01_1~point.10.000000_10.02_2~point.10.000000_10.03_3... and it seems up to about 150 points are working.
Documentation:
Microsoft Documentation: Create a Custom Map URL